From 443d54f95e74d3930b2bd7a6884c4000af326146 Mon Sep 17 00:00:00 2001 From: Johannes Quast Date: Thu, 28 Feb 2019 12:52:34 +0100 Subject: [PATCH] Simplify Dockerfile and halve image size --- CHANGELOG.md | 2 +- Util/Docker/Release.Dockerfile | 19 ++++++------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58e016eb4..81a8aac2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ ## Latest Changes - + * Simplify Dockerfile and halve Carla Docker image size * Synchronous mode, controlled with `client.tick()` * Allow changing map from client-side, added `client.load_map(name)`, `client.reload_map()`, and `client.get_available_maps()` * Control over multiple vehicles in batch mode diff --git a/Util/Docker/Release.Dockerfile b/Util/Docker/Release.Dockerfile index f7967483f..71c2d10a4 100644 --- a/Util/Docker/Release.Dockerfile +++ b/Util/Docker/Release.Dockerfile @@ -1,27 +1,20 @@ # Make sure drivers are >= 390 -# sudo docker run -p 2000-2002:2000-2002 --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=ID carla:latest ./CarlaUE4.sh -# /Game/Maps/Town01 -benchmark -carla-server -fps=10 -world-port=2000 -windowed -ResX=100 -ResY=100 -carla-no-hud +# docker run -p 2000-2002:2000-2002 --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=ID carla:latest ./CarlaUE4.sh +# /Game/Carla/Maps/Town01 -benchmark -carla-server -fps=10 -world-port=2000 -windowed -ResX=100 -ResY=100 -carla-no-hud FROM nvidia/opengl:1.0-glvnd-runtime-ubuntu16.04 - -RUN apt-get update; apt-get install -y libsdl2-2.0 +RUN packages='libsdl2-2.0' \ + && apt-get update && apt-get install -y $packages --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* RUN useradd -m carla -USER carla -ENV HOME /home/carla -COPY . /home/carla -USER root -RUN chown -R carla:carla /home/carla - -RUN apt-get -y install sudo -RUN echo "carla:carla" | chpasswd && adduser carla sudo +COPY --chown=carla:carla . /home/carla USER carla WORKDIR /home/carla - ENV SDL_VIDEODRIVER=offscreen CMD /bin/bash CarlaUE4.sh -carla-server