Skip to content

Commit 8ee4070

Browse files
committed
Added desktop-nvidia_unbuilt intermediate stage.
1 parent 01720cb commit 8ee4070

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.docker/Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,31 @@ FROM desktop_unbuilt AS desktop
245245
RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" \
246246
&& colcon build
247247

248+
# This repetition doesn't exactly sit right ... but I can't quite figure
249+
# out how to make this work without repeating either these instructions or
250+
# the colcon build
251+
FROM desktop_unbuilt AS desktop-nvidia_unbuilt
252+
253+
# Install NVIDIA software
254+
RUN sudo apt-get update \
255+
&& sudo apt-get -q -y upgrade \
256+
&& sudo apt-get install -y -qq --no-install-recommends \
257+
libglvnd0 \
258+
libgl1 \
259+
libglx0 \
260+
libegl1 \
261+
libxext6 \
262+
libx11-6 \
263+
&& sudo apt-get autoremove -y \
264+
&& sudo apt-get clean -y \
265+
&& sudo rm -rf /var/lib/apt/lists/*
266+
267+
# Env vars for the nvidia-container-runtime.
268+
ENV NVIDIA_VISIBLE_DEVICES=all
269+
ENV NVIDIA_DRIVER_CAPABILITIES=graphics,utility,compute
270+
ENV QT_X11_NO_MITSHM=1
271+
272+
248273
FROM desktop AS desktop-nvidia
249274

250275
# Install NVIDIA software

.docker/docker-bake.hcl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,16 @@ target "desktop" {
9393
]
9494
}
9595

96+
target "desktop-nvidia_unbuilt" {
97+
inherits = [ "desktop", "docker-metadata-action-desktop-nvidia" ]
98+
target = "desktop-nvidia_unbuilt"
99+
tags = [
100+
"ghcr.io/${BLUE_GITHUB_REPO}:${BLUE_ROS_DISTRO}-desktop-nvidia-unbuilt"
101+
]
102+
103+
}
104+
105+
96106
target "desktop-nvidia" {
97107
inherits = [ "desktop", "docker-metadata-action-desktop-nvidia" ]
98108
target = "desktop-nvidia"

0 commit comments

Comments
 (0)