Skip to content

Commit

Permalink
feat: add CUDA 11.8 images (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
olevski authored Aug 3, 2023
1 parent 1acfd50 commit 00f8986
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build-and-push-to-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,12 @@ jobs:
CUDA_CUDART_PACKAGE: "cuda-cudart-11-7=11.7.60-1"
CUDA_COMPAT_PACKAGE: "cuda-compat-11-7"
LIBCUDNN_PACKAGE: "libcudnn8=8.5.0.96-1+cuda11.7"
# note cuda 11.8 is available now, but there I could not
# find a cuda-compat package in the ubuntu repos at this time
- CUDA_VERSION: "11.8"
EXTRA_LIBRARIES: ""
CUDA_CUDART_PACKAGE: "cuda-cudart-11-8=11.8.89-1"
CUDA_COMPAT_PACKAGE: "cuda-compat-11-8"
LIBCUDNN_PACKAGE: "libcudnn8=8.6.0.163-1+cuda11.8"
ADD_2204_APT_REPOS: "true"
steps:
- name: Docker Login
uses: Azure/docker-login@v1
Expand Down Expand Up @@ -229,6 +233,7 @@ jobs:
CUDA_VERSION=${{ matrix.CUDA_VERSION }}
EXTRA_LIBRARIES=${{ matrix.EXTRA_LIBRARIES }}
LIBCUDNN_PACKAGE=${{ matrix.LIBCUDNN_PACKAGE }}
ADD_2204_APT_REPOS=${{ matrix.ADD_2204_APT_REPOS }}
context: docker/cuda
labels: ${{ steps.meta.outputs.labels }}
load: true
Expand Down
15 changes: 13 additions & 2 deletions docker/cuda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list && \
apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub && \
apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub && \
if [[ -z "${ADD_2204_APT_REPOS}" ]] ; \
then echo "Not adding 22.04 CUDA repos." ; \
else \
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub | apt-key add - && \
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64 /" > /etc/apt/sources.list.d/cuda.list && \
apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub ; \
fi && \
apt-get purge --autoremove -y curl \
&& rm -rf /var/lib/apt/lists/*

Expand Down Expand Up @@ -77,9 +84,13 @@ ENV LD_LIBRARY_PATH /usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:$LD

# Link the libcuda stub to the location where tensorflow is searching for it and reconfigure
# dynamic linker run-time bindings
RUN ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1 \
RUN if [[ -d /usr/local/cuda/lib64/stubs ]] ; \
then ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1 \
&& echo "/usr/local/cuda/lib64/stubs" > /etc/ld.so.conf.d/z-cuda-stubs.conf \
&& ldconfig
&& ldconfig ; \
else \
echo "libcuda stubs folder does not exist, skipping linking" ; \
fi

# See http://bugs.python.org/issue19846
ENV LANG C.UTF-8
Expand Down

0 comments on commit 00f8986

Please sign in to comment.