Skip to content

Commit bad35c5

Browse files
committed
upgrade to cuda 12.1
1 parent f224476 commit bad35c5

File tree

7 files changed

+62
-27
lines changed

7 files changed

+62
-27
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Set Nvidia as default container runtime for Docker in `/etc/docker/daemon.json`,
3535
To make development portable and deployable on cloud, it is recommended to run the IDE inside the container. Legacy solution installed the IDE inside the container which resulted in large container sizes (moving around useless packages). Best practice is to mount your IDE inside the container (to be specified in the docker-compose file or docker run) and start them from the container. GUI access is granted on Intel, AMD and NVIDIA GPUs by default. This enables portable code and easier cooperation of teams.
3636

3737
## Available Docker images
38-
Supported CUDA versions: `10.0`, `10.1`, `10.2` in all images, `latest` tag is not used as a best practice implementation.
38+
Supported CUDA versions: `10.0`, `10.1`, `10.2`, `11.5.1` in all images, `latest` tag is not used as a best practice implementation.
3939

4040

4141
### `xmindai/cuda-cudnn-opengl`

build_cuda_12_1_1.sh

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
set -e
3+
4+
OS_VERSION="ubuntu22.04"
5+
CUDA_VERSION="12.1.1"
6+
BASE="nvidia/cuda:${CUDA_VERSION}-cudnn8-devel-${OS_VERSION}"
7+
TAG="xmindai/cuda-python:${OS_VERSION}-${CUDA_VERSION}-cudnn8"
8+
9+
cd general-development
10+
./build.sh $BASE $BASE-dev
11+
cd ..
12+
13+
cd cuda-python-development
14+
./build.sh $BASE-dev $BASE-dev-py ${CUDA_VERSION}
15+
cd ..
16+
17+
cd user-layer
18+
./build.sh $BASE-dev-py $BASE-dev-py-user
19+
cd ..
20+
21+
cd nvidia-cuda-cudnn-opengl
22+
./build.sh $BASE-dev-py-user $TAG ${OS_VERSION}
23+
cd ..
24+
25+
docker push $TAG

cuda-cpp-development/install_tensorrt.sh

+12-10
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,28 @@ set -e
33

44
cuda=$1
55

6-
if [ "$cuda" == "10.0" ]
7-
then
6+
if [ "$cuda" == "10.0" ]; then
87
tag="cuda10.0-trt7.0.0.11-ga-20191216"
8+
name="nv-tensorrt-repo-ubuntu1804-${tag}_1-1_amd64.deb"
99
fi
10-
if [ "$cuda" == "10.1" ]
11-
then
10+
if [ "$cuda" == "10.1" ]; then
1211
echo "CUDA 10.1 is not supported by TensorRT, so it is not installed in this container!!"
1312
exit 0
1413
fi
15-
if [ "$cuda" == "10.2" ]
16-
then
14+
if [ "$cuda" == "10.2" ]; then
1715
tag="cuda10.2-trt7.0.0.11-ga-20191216"
16+
name="nv-tensorrt-repo-ubuntu1804-${tag}_1-1_amd64.deb"
17+
fi
18+
if [ "$cuda" == "12.1.1" ]; then
19+
name="nv-tensorrt-local-repo-ubuntu2204-8.6.1-cuda-12.0_1.0-1_amd64.deb"
1820
fi
1921

2022
cd /tmp
21-
wget --no-check-certificate https://mindstore0.blob.core.windows.net/blob0/nv-tensorrt-repo-ubuntu1804-${tag}_1-1_amd64.deb
22-
dpkg -i nv-tensorrt-repo-ubuntu1804-${tag}_1-1_amd64.deb
23-
apt-key add /var/nv-tensorrt-repo-${tag}/7fa2af80.pub
23+
wget --no-check-certificate https://mindstore0.blob.core.windows.net/blob0/${name}
24+
dpkg -i ${name}
25+
apt-key add /var/nv-tensorrt-repo-*/*.pub
2426

25-
dpkg -i /var/nv-tensorrt-repo-${tag}/*.deb
27+
dpkg -i /var/nv-tensorrt-repo-*/*.deb
2628
dpkg --remove nv-tensorrt-repo-ubuntu1804-${tag}
2729

2830
apt-get clean

cuda-python-development/conda_packages_installer.sh

+14-7
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,24 @@ set -e
33

44
cuda=$1
55

6-
if [ "$cuda" == "10.0" ]
7-
then
6+
conda update conda
7+
conda install -y conda-libmamba-solver
8+
conda config --set solver libmamba
9+
10+
if [ "$cuda" == "10.0" ]; then
811
conda install -y -c rapidsai -c nvidia -c conda-forge -c defaults -c pytorch -c anaconda python=3.7 cudatoolkit=10.0 pytorch --file /tmp/requirements.txt
912
fi
10-
if [ "$cuda" == "10.1" ]
11-
then
13+
if [ "$cuda" == "10.1" ]; then
1214
conda install -y -c rapidsai -c nvidia -c conda-forge -c defaults -c pytorch -c anaconda python=3.7 cudatoolkit=10.1 pytorch --file /tmp/requirements.txt
1315
fi
14-
if [ "$cuda" == "10.2" ]
15-
then
16+
if [ "$cuda" == "10.2" ]; then
1617
conda install -y -c rapidsai -c nvidia -c conda-forge -c defaults -c pytorch-nightly -c anaconda python=3.7 cudatoolkit=10.2 pytorch=1.6 --file /tmp/requirements.txt
1718
fi
19+
if [ "$cuda" == "11.5.1" ]; then
20+
conda install -y -c rapidsai -c nvidia -c conda-forge -c defaults -c pytorch-nightly -c anaconda python=3.9 cudatoolkit=11.5 pytorch=1.11 --file /tmp/requirements.txt
21+
fi
22+
if [ "$cuda" == "12.1.1" ]; then
23+
conda install -y -c rapidsai -c nvidia -c conda-forge -c pytorch-nightly -c anaconda python=3.10 pytorch pytorch-cuda=12.1 --file /tmp/requirements.txt
24+
fi
1825

19-
conda clean -ya
26+
conda clean -ya

cuda-python-development/requirements.txt

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ graphviz
1010
h5py
1111
ipython
1212
jupyterlab
13+
lightning
1314
matplotlib
1415
mkl
1516
mkl-include
@@ -22,12 +23,13 @@ plotly
2223
pylint
2324
pytest
2425
pyyaml
25-
rapids=0.13
2626
requests
2727
setuptools
2828
shapely
2929
slackclient
3030
tensorboard
3131
tensorboardX
32-
tensorflow-gpu
32+
tensorflow
33+
torchvision
34+
torchaudio
3335
tqdm

general-development/Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,13 @@ RUN mkdir /var/run/sshd
2727
# SSH login fix. Otherwise user is kicked off after login
2828
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
2929
EXPOSE 20022
30-
RUN echo "nameserver 8.8.8.8" > /etc/resolv.conf
3130

3231
# Microsoft Azure CLI
3332
RUN cd /tmp && wget https://aka.ms/InstallAzureCLIDeb && bash ./InstallAzureCLIDeb && rm ./InstallAzureCLIDeb &&\
3433
apt-get clean && \
3534
rm -rf /var/lib/apt/lists/* && \
3635
rm -rf /tmp/*
37-
36+
3837
# Kubectl
3938
RUN curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \
4039
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list &&\

nvidia-cuda-cudnn-opengl/build.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ if [[ -z "${base_image}" ]]; then
99
exit 1
1010
fi
1111

12-
if [[ -z "${target image}" ]]; then
12+
if [[ -z "${target_image}" ]]; then
1313
echo "No target image given" 1>&2
1414
exit 1
1515
fi
1616

1717
if [[ -z "${ubuntu_version}" ]]; then
18-
echo "No ubuntu version given using: ubuntu18.04" 1>&2
19-
ubuntu_version="ubuntu18.04"
18+
echo "No ubuntu version given using: ubuntu22.04" 1>&2
19+
ubuntu_version="ubuntu22.04"
2020
fi
2121

2222
set -e
23-
23+
rm -rf opengl
2424
git clone -b ${ubuntu_version} https://gitlab.com/nvidia/container-images/opengl.git
2525

26-
docker build --build-arg from=${base_image} -t cudagl_base ./opengl/base
26+
docker build --build-arg from=${base_image} -t cudagl_base -f ./opengl/base/Dockerfile ./opengl
2727
docker build --build-arg from=cudagl_base -t cudagl_runtime ./opengl/glvnd/runtime
2828
docker build --build-arg from=cudagl_runtime -t ${target_image} ./opengl/glvnd/devel
2929

0 commit comments

Comments
 (0)