Skip to content

Commit

Permalink
changes to how we build base images, via lego bricks :)
Browse files Browse the repository at this point in the history
  • Loading branch information
Edwardius committed Dec 19, 2023
1 parent f884b6a commit be9f56f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
ARG UBUNTU_DISTRO
ARG CUDA_VERSION

####################### Nvidia CUDA Base Image #######################
FROM nvidia/cuda:${CUDA_VERSION}-devel-${UBUNTU_DISTRO} as base

# Save Environment Properties
ENV CUDA_VERSION=${CUDA_VERSION}
ENV UBUNTU_DISTRO=${UBUNTU_DISTRO}
ARG GENERIC_IMAGE

########################## Install ROS2 Core ##########################
FROM base as core
FROM {GENERIC_IMAGE} as core

# setup timezone
RUN echo 'Etc/UTC' > /etc/timezone && \
Expand Down
17 changes: 17 additions & 0 deletions docker/base/inject_tensorrt.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ARG GENERIC_IMAGE
ARG TENSORRT_PKG

########################## Install TensorRT ##########################
FROM {GENERIC_IMAGE} as core

# List of TensorRT Packages (must login):
# https://developer.nvidia.com/tensorrt-download
ENV PKG=${TENSORRT_PKG}

RUN dpkg -i ${PKG}.deb && \
cp /var/${PKG%_*_*}/*-keyring.gpg /usr/share/keyrings/

# Installs full runtime (lean runtimes also available:
# https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html)
RUN apt-get update && apt-get q -y --no-install-recommends \
tensorrt

0 comments on commit be9f56f

Please sign in to comment.