From ada75f920642e18cace0a9f85ecf9d4077ddb531 Mon Sep 17 00:00:00 2001 From: Joel Moriana Date: Wed, 18 Dec 2024 15:07:43 +0100 Subject: [PATCH] Release dockerfile updated --- Util/Docker/Release.Dockerfile | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/Util/Docker/Release.Dockerfile b/Util/Docker/Release.Dockerfile index 0c03394a328..495fb552255 100644 --- a/Util/Docker/Release.Dockerfile +++ b/Util/Docker/Release.Dockerfile @@ -1,13 +1,17 @@ +ARG UBUNTU_DISTRO="22.04" -# run the docker container as: -# -# sudo -E docker run --rm --gpus all -it --net=host carla:latest /bin/bash +FROM ubuntu:${UBUNTU_DISTRO} -FROM nvidia/vulkan:1.1.121-cuda-10.1--ubuntu18.04 +RUN packages='libsdl2-2.0 xserver-xorg libvulkan1 libomp5' \ + && apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y $packages \ + && rm -rf /var/lib/apt/lists/* -RUN apt-key adv --fetch-keys "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub" - -RUN packages='libsdl2-2.0 xserver-xorg libvulkan1 libomp5' && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y $packages --no-install-recommends +# Install the `xdg-user-dir` tool so the Unreal Engine can use it to locate the user's Documents directory +RUN packages='xdg-user-dirs' \ + && apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y $packages \ + && rm -rf /var/lib/apt/lists/* RUN useradd -m carla @@ -16,6 +20,7 @@ COPY --chown=carla:carla . /home/carla USER carla WORKDIR /home/carla -# you can also run CARLA in offscreen mode with -RenderOffScreen -# CMD /bin/bash CarlaUnreal.sh -RenderOffScreen -CMD /bin/bash CarlaUnreal.sh +ENV SDL_VIDEODRIVER="x11" + +# You can also run CARLA in offscreen mode with -RenderOffScreen +CMD ["/bin/bash", "CarlaUnreal.sh"]