Skip to content

Commit 01dceee

Browse files
committed
Use CUDA base image and harden Docker apt installs
1 parent 5f67253 commit 01dceee

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

docker/Dockerfile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# UniROS RL stack — Ubuntu 20.04 + ROS Noetic + framework + 4 robots.
1+
# UniROS RL stack — CUDA Ubuntu 20.04 + ROS Noetic + framework + 4 robots.
22
#
33
# Build (from the directory containing this Dockerfile):
44
# ./build.sh # uses your host UID/GID by default
@@ -15,12 +15,18 @@
1515
# sb3_ros_support, rl_environments, rl_training_validation) so users
1616
# can build it from whichever repo they cloned first.
1717

18-
FROM ubuntu:20.04
18+
FROM nvidia/cuda:12.9.2-devel-ubuntu20.04
1919

2020
ARG DEBIAN_FRONTEND=noninteractive
2121
ARG TZ=Etc/UTC
2222
ENV TZ=${TZ}
2323

24+
# Make long ROS / Ubuntu apt transactions less fragile in Docker builds.
25+
# This helps with transient mirror/network errors such as failed downloads
26+
# of large dependency sets while installing ros-noetic-desktop-full.
27+
RUN printf 'Acquire::Retries "5";\nAcquire::http::Timeout "60";\nAcquire::https::Timeout "60";\n' \
28+
> /etc/apt/apt.conf.d/80-retries
29+
2430
# The container runs as a non-root user so that bind-mounted host
2531
# workspaces don't end up with root-owned build/ and devel/ files.
2632
# UID/GID are build-time arguments — build.sh defaults them to the
@@ -31,7 +37,8 @@ ARG USER_GID=1000
3137

3238
# Minimal system deps the installer itself needs to bootstrap. Everything
3339
# else (ROS Noetic, framework packages, vendor robot packages, pip deps)
34-
# is pulled in by install_uniros_stack.sh.
40+
# is pulled in by install_uniros_stack.sh. Terminator is included for an
41+
# easier multi-terminal workflow when running the GUI container.
3542
RUN apt-get update && apt-get install -y --no-install-recommends \
3643
ca-certificates \
3744
curl \
@@ -44,6 +51,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
4451
build-essential \
4552
python3-pip \
4653
ncurses-bin \
54+
terminator \
4755
&& ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \
4856
&& dpkg-reconfigure --frontend noninteractive tzdata \
4957
&& locale-gen en_US.UTF-8 \

0 commit comments

Comments
 (0)