Skip to content

Commit 64942a1

Browse files
committed
Added desktop-nvidia_unbuilt intermediate stage.
1 parent e26485e commit 64942a1

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
@@ -252,6 +252,31 @@ FROM desktop_unbuilt AS desktop
252252
RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" \
253253
&& colcon build
254254

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

257282
# 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)