Skip to content

Commit ba4dded

Browse files
authored
Merge pull request opencv#11 from Yadunund/revert-9-revert-7-vt/base_image
Revert "Revert "added base image dockerfile for nvidia GPU support""
2 parents 7d1083b + 613012c commit ba4dded

File tree

3 files changed

+49
-1
lines changed

3 files changed

+49
-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: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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

Comments
 (0)