Skip to content

Commit

Permalink
Update DockerfileGPU
Browse files Browse the repository at this point in the history
  • Loading branch information
fnhirwa authored Mar 30, 2024
1 parent db45b1f commit 2bedffd
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docker/DockerfileGPU
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,32 @@ RUN python3 test_dependencies.py -fp requirements.txt,optional_gpu.txt && \
rm -rf tmp.txt && \
rm -rf optional_gpu.txt && \
rm -rf test_dependencies.py

# Install some basic utilities if not already installed
RUN apt-get update && apt-get install -y \
curl \
ca-certificates \
sudo \
git \
bzip2 \
libx11-6 \
&& rm -rf /var/lib/apt/lists/*

# Add the NVIDIA GPG key
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
RUN apt-key add 7fa2af80.pub

# Add the NVIDIA repository
RUN sh -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list'

# Install the CUDA Toolkit
RUN apt-get update && apt-get install -y \
cuda-command-line-tools-10-1 \
&& rm -rf /var/lib/apt/lists/*

# Set the PATH to include the CUDA Toolkit
ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64

# Verify the installation
RUN nvcc --version

0 comments on commit 2bedffd

Please sign in to comment.