|
| 1 | +FROM ros:jazzy-perception AS base |
| 2 | + |
| 3 | +ARG DEBIAN_FRONTEND=noninteractive |
| 4 | + |
| 5 | +# Prerequisites |
| 6 | +RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 7 | + wget software-properties-common gnupg2 \ |
| 8 | + && rm -rf /var/lib/apt/lists/* |
| 9 | + |
| 10 | +# Enable contrib on debian to get required |
| 11 | +# https://packages.debian.org/bullseye/glx-alternative-nvidia |
| 12 | + |
| 13 | +# Remove cuda from base image for disk space savings |
| 14 | +# RUN \ |
| 15 | +# wget -q https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb && \ |
| 16 | +# dpkg -i cuda-keyring_1.1-1_all.deb && \ |
| 17 | +# rm cuda-keyring_1.1-1_all.deb && \ |
| 18 | +# apt-get update && \ |
| 19 | +# apt-get install -y software-properties-common && \ |
| 20 | +# add-apt-repository "deb http://archive.ubuntu.com/ubuntu noble main restricted universe multiverse" && \ |
| 21 | +# add-apt-repository "deb http://archive.ubuntu.com/ubuntu noble-updates main restricted universe multiverse" && \ |
| 22 | +# add-apt-repository "deb http://archive.ubuntu.com/ubuntu noble contrib non-free-firmware" && \ |
| 23 | +# apt-get update && \ |
| 24 | +# apt-get -y install cuda-toolkit && \ |
| 25 | +# rm -rf /var/lib/apt/lists/* |
| 26 | + |
| 27 | +# File conflict problem with libnvidia-ml.so.1 and libcuda.so.1 |
| 28 | +# https://github.com/NVIDIA/nvidia-docker/issues/1551 |
| 29 | +RUN rm -rf /usr/lib/x86_64-linux-gnu/libnv* |
| 30 | +RUN rm -rf /usr/lib/x86_64-linux-gnu/libcuda* |
| 31 | + |
| 32 | +# TODO(tfoote) Add documentation of why these are required |
| 33 | +ENV PATH /usr/local/cuda/bin${PATH:+:${PATH}} |
| 34 | +ENV LD_LIBRARY_PATH /usr/local/cuda/lib64/stubs:/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} |
0 commit comments