github.com/kubeflow/training-operator@v1.7.0/examples/mxnet/tune/Dockerfile (about) 1 FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu16.04 2 3 # Download usefull tools and mxnet, tvm 4 WORKDIR /home/scripts 5 RUN apt-get update && apt-get install -y git vim cmake wget sed && \ 6 git clone --recursive https://github.com/dmlc/tvm && \ 7 git clone --recursive https://github.com/apache/incubator-mxnet mxnet 8 9 # Download necessary dependence 10 RUN apt-get update && \ 11 apt-get install -y python3 python3-dev python3-setuptools gcc libtinfo-dev zlib1g-dev && \ 12 apt-get install -y python3-pip && \ 13 apt-get install -y build-essential 14 15 # mxnet dependence 16 RUN apt-get install -y libopenblas-dev liblapack-dev && \ 17 apt-get install -y libopencv-dev 18 19 # tvm dependence 20 RUN pip3 install --user numpy decorator && \ 21 pip3 install --user tornado psutil xgboost 22 23 # get llvm 4.0.0 for tvm 24 RUN wget http://releases.llvm.org/4.0.0/clang+llvm-4.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz && \ 25 tar -xf clang+llvm-4.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz && \ 26 mv clang+llvm-4.0.0-x86_64-linux-gnu-ubuntu-16.04 llvm && \ 27 rm clang+llvm-4.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz 28 29 # Compile mxnet 30 RUN cd mxnet && \ 31 make clean && \ 32 make -j $(nproc) USE_OPENCV=1 USE_BLAS=openblas USE_DIST_KVSTORE=1 USE_CUDA=1 USE_CUDA_PATH=/usr/local/cuda USE_CUDNN=1 33 34 # Install mxnet 35 RUN cd mxnet/python && \ 36 pip3 install -e . 37 38 # Compile tvm 39 RUN cd tvm && \ 40 mkdir build && \ 41 cp cmake/config.cmake build && \ 42 cd build && \ 43 sed -i 's/set(USE_CUDA OFF)/set(USE_CUDA ON)/g' config.cmake && \ 44 sed -i 's/set(USE_CUDNN OFF)/set(USE_CUDNN ON)/g' config.cmake && \ 45 sed -i 's/set(USE_CUBLAS OFF)/set(USE_CUBLAS ON)/g' config.cmake && \ 46 sed -i 's/set(USE_LLVM OFF)/set(USE_LLVM ..\/..\/llvm\/bin\/llvm-config)/g' config.cmake && \ 47 cmake .. && \ 48 make -j $(nproc) 49 50 # Install tvm 51 RUN cd tvm && \ 52 cd python; python3 setup.py install --user; cd .. && \ 53 cd topi/python; python3 setup.py install --user; cd ../.. && \ 54 cd nnvm/python; python3 setup.py install --user; cd ../.. 55 56 # COPY custom code to container 57 COPY start-job.py . 58 COPY auto-tuning.py . 59 60 # Change working path 61 WORKDIR /home/log