11# pytorch/TensorRT/docker/Dockerfile
22# Base image starts with CUDA
3- ARG BASE_IMG=nvidia/cuda:12.4 .1-devel-ubuntu22 .04
3+ ARG BASE_IMG=nvidia/cuda:12.6 .1-devel-ubuntu24 .04
44FROM ${BASE_IMG} as base
5- ENV BASE_IMG=nvidia/cuda:12.4 .1-devel-ubuntu22 .04
5+ ENV BASE_IMG=nvidia/cuda:12.6 .1-devel-ubuntu24 .04
66
77ARG TENSORRT_VERSION
88ENV TENSORRT_VERSION=${TENSORRT_VERSION}
@@ -17,28 +17,14 @@ ENV DEBIAN_FRONTEND=noninteractive
1717
1818# Install basic dependencies
1919RUN apt-get update
20- RUN apt install -y build-essential manpages-dev wget zlib1g software-properties-common git libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget ca-certificates curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev mecab-ipadic-utf8
21-
22- # Install PyEnv and desired Python version
23- ENV HOME="/root"
24- ENV PYENV_DIR="$HOME/.pyenv"
25- ENV PATH="$PYENV_DIR/shims:$PYENV_DIR/bin:$PATH"
26- RUN wget -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer &&\
27- chmod 755 pyenv-installer &&\
28- bash pyenv-installer &&\
29- eval "$(pyenv init -)"
30-
31- RUN pyenv install -v ${PYTHON_VERSION}
32- RUN pyenv global ${PYTHON_VERSION}
20+ RUN apt install -y build-essential manpages-dev wget zlib1g software-properties-common git libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev ca-certificates curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev mecab-ipadic-utf8
3321
3422# Install TensorRT + dependencies
35- RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204 /x86_64/3bf863cc.pub
36- RUN add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204 /x86_64/ /"
23+ RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404 /x86_64/3bf863cc.pub
24+ RUN add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404 /x86_64/ /"
3725RUN apt-get update
3826RUN TENSORRT_MAJOR_VERSION=`echo ${TENSORRT_VERSION} | cut -d '.' -f 1` && apt-get install -y tensorrt
3927
40- ENV DEBIAN_FRONTEND=noninteractive
41-
4228RUN apt update && apt install locales && \
4329 locale-gen en_US en_US.UTF-8 && \
4430 update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \
@@ -47,27 +33,22 @@ RUN apt update && apt install locales && \
4733ENV LANG=en_US.UTF-8
4834
4935RUN apt update && \
50- apt install -y git wget curl gnupg2 lsb-release && \
51- curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
36+ apt install -y git wget curl gnupg2 lsb-release
37+
38+ RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
5239 echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null && \
53- sed -i -e 's/ubuntu .* main/ubuntu jammy main/g' /etc/apt/sources.list.d/ros2.list && \
40+ sed -i -e 's/ubuntu .* main/ubuntu noble main/g' /etc/apt/sources.list.d/ros2.list && \
5441 apt update && \
5542 apt install -y ros-dev-tools \
56- ros-humble-cv-bridge \
57- ros-humble-generate-parameter-library \
58- ros-humble-parameter-traits \
59- ros-humble-ros-base \
60- ros-humble-rqt-image-view \
61- ros-humble-v4l2-camera && \
43+ ros-jazzy-cv-bridge \
44+ ros-jazzy-generate-parameter-library \
45+ ros-jazzy-parameter-traits \
46+ ros-jazzy-ros-base \
47+ ros-jazzy-rqt-image-view \
48+ ros-jazzy-usb-cam \
49+ ros-jazzy-vision-msgs && \
6250 apt -y clean && \
63- rm -rf /var/lib/apt/lists/* && \
64- pip install -U pip && \
65- pip install catkin_pkg && \
66- pip install empy==3.3.4 && \
67- pip install lark && \
68- python3 -m pip cache purge
51+ rm -rf /var/lib/apt/lists/*
6952
7053COPY ./ros_entrypoint.sh /ros_entrypoint.sh
7154RUN echo "source /ros_entrypoint.sh" >> /root/.bashrc
72- # ENTRYPOINT ["/ros_entrypoint.sh"]
73- CMD ["bash"]
0 commit comments