github.com/sentienttechnologies/studio-go-runner@v0.0.0-20201118202441-6d21f2ced8ee/Dockerfile_base (about) 1 FROM ubuntu:18.04 2 3 MAINTAINER karlmutch@gmail.com 4 5 ENV LANG C.UTF-8 6 ENV DEBIAN_FRONTEND noninteractive 7 8 ENV CUDA_PACKAGE_VERSION 10-1 9 ENV CUDA_FILESYS_VERSION 10.1 10 ENV NVIDIA_VERSION 440 11 12 RUN apt-get update && \ 13 apt-get install -y locales && \ 14 apt-get install -y language-pack-en && \ 15 update-locale "en_US.UTF-8" && \ 16 apt-get install -y --no-install-recommends ca-certificates apt-transport-https apt-utils && \ 17 apt-get install -y --no-install-recommends openssl ssh wget curl lshw jq htop vim pkg-config unzip gnupg2 && \ 18 apt-get install -y --no-install-recommends libopenblas-base && \ 19 apt-get -y upgrade && \ 20 apt-get clean 21 22 RUN mkdir /usr/lib/nvidia && \ 23 cd /tmp && \ 24 apt-get install -y freeglut3 freeglut3-dev libxi-dev libxmu-dev && \ 25 apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub && \ 26 wget -q -O /tmp/cuda.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.1.243-1_amd64.deb && \ 27 dpkg -i /tmp/cuda.deb && \ 28 apt-get -y update 29 30 RUN apt-get -y install --no-install-recommends nvidia-cuda-dev && \ 31 apt-get -y install --no-install-recommends cuda-nvml-dev-${CUDA_PACKAGE_VERSION} && \ 32 apt-get clean 33 34 RUN \ 35 ls /usr/lib | grep nvidia && \ 36 ln -s /usr/local/cuda-${CUDA_FILESYS_VERSION} /usr/local/cuda && \ 37 ln -s /usr/local/cuda/targets/x86_64-linux/include /usr/local/cuda/include && \ 38 ln -s /usr/lib/nvidia-${NVIDIA_VERSION}/libnvidia-ml.so /usr/lib/nvidia/libnvidia-ml.so && \ 39 ln -s /usr/lib/nvidia-${NVIDIA_VERSION}/libnvidia-ml.so.1 /usr/lib/nvidia/libnvidia-ml.so.1 && \ 40 ln -s /usr/lib/nvidia-${NVIDIA_VERSION}/libnvidia-ml.so.${NVIDIA_VERSION}.33.01 /usr/lib/nvidia/libnvidia-ml.so.${NVIDIA_VERSION}.33.01 && \ 41 apt-get -y install --no-install-recommends libcuinj64-9.1 && \ 42 rm /tmp/cuda*.deb && \ 43 apt-get -y autoclean && \ 44 apt-get -y autoremove && \ 45 apt-get clean 46 47 # Install the runtime components for nvidia 48 49 RUN \ 50 rm -rf /var/lib/apt/lists/* && \ 51 echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list && \ 52 echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list && \ 53 apt-get update 54 55 56 RUN apt-get install -y --no-install-recommends \ 57 cuda-cudart-10-0=10.0.130-1 \ 58 cuda-cufft-10-0 \ 59 cuda-curand-10-0 \ 60 cuda-cusolver-10-0 \ 61 cuda-cusparse-10-0 \ 62 cuda-libraries-10-0=10.0.130-1 \ 63 cuda-cublas-10-0=10.0.130-1 \ 64 cuda-runtime-10-0 65 66 RUN apt-get install -y --no-install-recommends \ 67 cuda-cudart-10-1 \ 68 cuda-cufft-10-1 \ 69 cuda-curand-10-1 \ 70 cuda-cusolver-10-1 \ 71 cuda-cusparse-10-1 \ 72 cuda-libraries-10-1 \ 73 libcublas10=10.2.1.243-1 74 75 RUN echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \ 76 echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf 77 78 ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH} 79 ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/lib/nvidia 80 81 # nvidia-container-runtime 82 ENV NVIDIA_VISIBLE_DEVICES all 83 ENV NVIDIA_DRIVER_CAPABILITIES compute,utility 84 ENV NVIDIA_REQUIRE_CUDA "cuda>=10.1" 85 86 # Pick up some TF dependencies 87 RUN apt-get update && apt-get install -y --no-install-recommends \ 88 libcudnn7=7.6.4.38-1+cuda10.1 \ 89 libcudnn7-dev=7.6.4.38-1+cuda10.1 \ 90 libhdf5-serial-dev \ 91 libpng-dev \ 92 libzmq3-dev \ 93 && \ 94 apt-get clean && \ 95 apt-get autoremove 96 97 98 RUN apt-get install -y libssl-dev zlib1g-dev \ 99 libbz2-dev libreadline-dev libsqlite3-dev llvm libncurses5-dev \ 100 libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python3-openssl \ 101 libopenblas-base libopenblas-dev git build-essential 102 103 RUN \ 104 curl https://pyenv.run | /bin/bash && \ 105 export PATH=$HOME/.pyenv/bin:$PATH && \ 106 echo "export PATH=\"$HOME/.pyenv/bin:$PATH\"" >> $HOME/.bashrc && \ 107 echo "eval \"\$(pyenv init -)\"" >> $HOME/.bashrc && \ 108 echo "eval \"\$(pyenv virtualenv-init -)\"" >> $HOME/.bashrc && \ 109 eval "$(pyenv init -)" && \ 110 eval "$(pyenv virtualenv-init -)" && \ 111 pyenv install --list | grep " 3\.[5678]" && \ 112 pyenv install 3.8.3 && \ 113 pyenv install 3.7.6 && \ 114 pyenv install 3.6.10 && \ 115 pyenv install 3.5.9 && \ 116 pyenv global 3.6.10 117 118 ENV PATH /root/.pyenv/bin:$PATH 119 120 RUN \ 121 eval "$(pyenv init -)" && \ 122 eval "$(pyenv virtualenv-init -)" && \ 123 which python3 && \ 124 which pip3 && \ 125 curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ 126 python3 get-pip.py pip==20.1 setuptools==44.0.0 wheel==0.33.6 && \ 127 pip3 install pyopenssl cryptography --upgrade 128 129 RUN apt-get -y install libssl-dev libcurl4-openssl-dev libsm6 libxrender-dev libxext-dev libopenblas-base libopenblas-dev && \ 130 eval "$(pyenv init -)" && \ 131 eval "$(pyenv virtualenv-init -)" && \ 132 pip3 install tensorflow-gpu==1.13.1 && \ 133 pip3 install tensorflow-gpu==1.14.0 && \ 134 pip3 install tensorflow-gpu==1.15.2 && \ 135 apt-get clean 136 137 # Will be overitten by other images deriving from this base image 138 CMD ["/bin/bash"] 139 140 LABEL vendor="Cognizant, AI&A" \ 141 registry.version=0.0.5 \ 142 registry.repo=leafai/studio-go-runner-dev-base \ 143 registry.base=studio-go-runner-dev-base