Skip to content

Commit 4d50d60

Browse files
authored
Merge pull request #7 from Yadunund/vt/base_image
added base image dockerfile for nvidia GPU support
2 parents 4a6e13a + 14ad455 commit 4d50d60

File tree

3 files changed

+48
-1
lines changed

3 files changed

+48
-1
lines changed

.github/workflows/build.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,20 @@ jobs:
1717
-
1818
name: Set up Docker Buildx
1919
uses: docker/setup-buildx-action@v3
20+
-
21+
name: Login to GitHub Container Registry
22+
uses: docker/login-action@v3
23+
with:
24+
registry: ghcr.io
25+
username: ${{ github.actor }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
-
28+
name: Build estimator base
29+
uses: docker/build-push-action@v6
30+
with:
31+
file: Dockerfile.estimator.base
32+
push: true
33+
tags: ghcr.io/yadunund/ibpc/estimator-base:latest
2034
-
2135
name: Build estimator
2236
uses: docker/build-push-action@v6

Dockerfile.estimator

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ros:jazzy-perception AS base
1+
FROM ghcr.io/yadunund/ibpc/estimator-base:latest AS base
22

33
SHELL [ "/bin/bash" , "-c" ]
44

Dockerfile.estimator.base

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
RUN \
14+
wget -q https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb && \
15+
dpkg -i cuda-keyring_1.1-1_all.deb && \
16+
rm cuda-keyring_1.1-1_all.deb && \
17+
apt-get update && \
18+
apt-get install -y software-properties-common && \
19+
add-apt-repository "deb http://archive.ubuntu.com/ubuntu noble main restricted universe multiverse" && \
20+
add-apt-repository "deb http://archive.ubuntu.com/ubuntu noble-updates main restricted universe multiverse" && \
21+
add-apt-repository "deb http://archive.ubuntu.com/ubuntu noble contrib non-free-firmware" && \
22+
apt-get update && \
23+
apt-get -y install cuda-toolkit && \
24+
rm -rf /var/lib/apt/lists/*
25+
26+
# File conflict problem with libnvidia-ml.so.1 and libcuda.so.1
27+
# https://github.com/NVIDIA/nvidia-docker/issues/1551
28+
RUN rm -rf /usr/lib/x86_64-linux-gnu/libnv*
29+
RUN rm -rf /usr/lib/x86_64-linux-gnu/libcuda*
30+
31+
# TODO(tfoote) Add documentation of why these are required
32+
ENV PATH /usr/local/cuda/bin${PATH:+:${PATH}}
33+
ENV LD_LIBRARY_PATH /usr/local/cuda/lib64/stubs:/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

0 commit comments

Comments
 (0)