File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -245,6 +245,31 @@ FROM desktop_unbuilt AS desktop
245245RUN . "/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+
248273FROM desktop AS desktop-nvidia
249274
250275# Install NVIDIA software
Original file line number Diff line number Diff 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+
96106target "desktop-nvidia" {
97107 inherits = [ " desktop" , " docker-metadata-action-desktop-nvidia" ]
98108 target = " desktop-nvidia"
You can’t perform that action at this time.
0 commit comments