Skip to content

Commit

Permalink
Update CUDA in Dockerfile and bump requirement versions
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxJa4 committed Nov 30, 2023
1 parent 3d02372 commit d154d14
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 24 deletions.
23 changes: 11 additions & 12 deletions build/docker/agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,19 @@ RUN wget https://github.com/libgit2/libgit2/archive/refs/tags/v1.5.0.tar.gz -O l
# CUDA installation
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin \
&& mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 \
&& wget https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda-repo-ubuntu2004-11-7-local_11.7.0-515.43.04-1_amd64.deb \
&& dpkg -i cuda-repo-ubuntu2004-11-7-local_11.7.0-515.43.04-1_amd64.deb \
&& cp /var/cuda-repo-ubuntu2004-11-7-local/cuda-*-keyring.gpg /usr/share/keyrings/ \
&& wget https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda-repo-ubuntu2004-12-1-local_12.1.1-530.30.02-1_amd64.deb \
&& dpkg -i cuda-repo-ubuntu2004-12-1-local_12.1.1-530.30.02-1_amd64.deb \
&& cp /var/cuda-repo-ubuntu2004-12-1-local/cuda-*-keyring.gpg /usr/share/keyrings/ \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install cuda-nvcc-11-7 \
&& rm cuda-repo-ubuntu2004-11-7-local_11.7.0-515.43.04-1_amd64.deb \
&& apt-get -y remove cuda-repo-ubuntu2004-11-7-local \
&& cat /etc/apt/sources.list \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install cuda \
&& rm cuda-repo-ubuntu2004-12-1-local_12.1.1-530.30.02-1_amd64.deb \
&& apt-get -y remove cuda-repo-ubuntu2004-12-1-local \
&& rm /etc/apt/preferences.d/cuda-repository-pin-600 \
&& rm -rf /var/cuda-repo-ubuntu1804-11-7-local/ \
&& rm /etc/apt/sources.list.d/cuda-ubuntu2004-11-7-local.list \
&& rm -rf /var/cuda-repo-ubuntu1804-12-1-local/ \
&& rm /etc/apt/sources.list.d/cuda-ubuntu2004-12-1-local.list \
&& apt-get clean

ENV CUDA_HOME=/usr/local/cuda-11.7
ENV CUDA_HOME=/usr/local/cuda-12.1

# override python path, carla pip package path didn't exist and was using Python 3.7 instead of 2.7
ENV PYTHONPATH=/opt/ros/noetic/lib/python3/dist-packages
Expand Down Expand Up @@ -154,11 +153,11 @@ RUN echo /catkin_ws/install/lib/python3/dist-packages >> /home/$USERNAME/.local/

RUN sudo mkdir /workspace && sudo chown $USERNAME:$USERNAME /workspace

RUN echo "export CUDA_HOME=/usr/local/cuda-11" >> ~/.bashrc \
RUN echo "export CUDA_HOME=/usr/local/cuda-12" >> ~/.bashrc \
&& echo "export PATH=$PATH:$CUDA_HOME/bin" >> ~/.bashrc

COPY --chown=$USERNAME:$USERNAME ./code/requirements.txt /workspace/
ENV TORCH_CUDA_ARCH_LIST="5.2 6.0 6.1 7.0 7.5 8.0 8.6+PTX"
ENV TORCH_CUDA_ARCH_LIST="5.2 6.0 6.1 7.0 7.5 8.0 8.6 8.7 8.9+PTX"
ENV IABN_FORCE_CUDA=1

RUN source ~/.bashrc && pip install -r /workspace/requirements.txt
Expand Down
24 changes: 12 additions & 12 deletions code/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
dvc==2.36.0
dvc-gdrive==2.19.1
torch==1.13.1
torchvision==0.14.1
torchaudio==0.13.1
pytorch-lightning==1.8.5
opencv-python==4.7.0.68
dvclive==1.3.2
ruamel.yaml==0.17.21
scipy==1.10.0
dvc==3.30.3
dvc-gdrive==2.20.0
torch==2.1.1
torchvision==0.16.1
torchaudio==2.1.1
pytorch-lightning==2.1.2
opencv-python==4.8.1.78
dvclive==3.3.1
ruamel.yaml==0.18.5
scipy==1.10.1
xmltodict==0.13.0
py-trees==2.1.6
numpy==1.23.5
py-trees==2.2.3
numpy==1.24.4

0 comments on commit d154d14

Please sign in to comment.