github.com/sentienttechnologies/studio-go-runner@v0.0.0-20201118202441-6d21f2ced8ee/examples/singularity/cuda-8.0.def (about) 1 # Copyright (c) 2019-2020 Cognizant Digital Business, Evolutionary AI. All rights reserved. Issued under the Apache 2.0 License. 2 BootStrap: debootstrap 3 DistType "debian" 4 OSVersion: xenial 5 MirrorURL: http://us.archive.ubuntu.com/ubuntu/ 6 7 # 8 # To build an image from this definition file the following command could be used 9 # 10 # sudo singularity build test.img minimal_cuda.def 11 # 12 # To run the result image from the build use a command such as the following 13 # 14 # sudo singularity exec -B /usr/local/cuda:/usr/local/cuda -B /usr/lib/nvidia-384:/usr/lib/nvidia-384 --nv test.img bash 15 # 16 17 %runscript 18 echo "This is what happens when you run the container..." 19 20 %environment 21 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/nvidia-384:/usr/local/cuda/lib64 22 export LD_LIBRARY_PATH 23 24 %post 25 cat <<EOT >>/etc/apt/sources.list 26 deb http://archive.ubuntu.com/ubuntu xenial universe multiverse 27 deb-src http://archive.ubuntu.com/ubuntu xenial universe multiverse 28 29 deb http://us.archive.ubuntu.com/ubuntu/ xenial universe 30 deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe 31 deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe 32 deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe 33 34 deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse 35 deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse 36 deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse 37 deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse 38 39 deb http://security.ubuntu.com/ubuntu xenial-security universe 40 deb-src http://security.ubuntu.com/ubuntu xenial-security universe 41 deb http://security.ubuntu.com/ubuntu xenial-security multiverse 42 deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse 43 EOT 44 apt-get -y install language-pack-en-base libgomp1 wget git 45 wget --no-check-certificate https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb 46 dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb 47 apt-get update 48 apt-get -y install --no-install-recommends python2.7 python2.7-dev python3.5 python3.5-dev python-pip 49 #apt-get -y install --no-install-recommends cuda-nvrtc-8-0 cuda-nvgraph-8-0 cuda-cusolver-8-0 cuda-cublas-8-0 cuda-cufft-8-0 cuda-curand-8-0 cuda-cusparse-8-0 cuda-npp-8-0 cuda-cudart-8-0 50 #apt-get -y install --no-install-recommends nvidia-smi 51 pip install --upgrade pip setuptools 52 pip install tensorflow-gpu