diff --git a/Dockerfile b/Dockerfile index d1feb4f..0d53cdf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -232,7 +232,11 @@ RUN tar xfvz /home/$USERNAME/AdditionalMaps_0.9.10.1.tar.gz -C /opt/carla-simulator/ && \ rm /home/$USERNAME/AdditionalMaps_0.9.10.1.tar.gz RUN mkdir -p /home/$USERNAME/.config && \ - chmod -R 777 /home/$USERNAME/.config + chmod -R 777 /home/$USERNAME/.config && \ + mkdir -p /home/$USERNAME/.cache && \ + chmod -R 777 /home/$USERNAME/.cache COPY run.sh /run.sh +EXPOSE 5900 +EXPOSE 8081 CMD ["bash", "/run.sh"] diff --git a/run.sh b/run.sh index d40b78f..1d22c35 100755 --- a/run.sh +++ b/run.sh @@ -3,7 +3,7 @@ # 0. generate xorg.conf BUS_ID=$(nvidia-xconfig --query-gpu-info | grep 'PCI BusID' | sed -r 's/\s*PCI BusID : PCI:(.*)/\1/') -nvidia-xconfig -a --virtual=$RESOLUTION --allow-empty-initial-configuration --enable-all-gpus --busid $BUS_ID --use-display-device="DFP-0" --connected-monitor="DFP-0" +nvidia-xconfig -a --virtual=$RESOLUTION --allow-empty-initial-configuration --enable-all-gpus --busid $BUS_ID --use-display-device="DFP-0" --connected-monitor="DFP-0" # 1. launch X server Xorg :0 & diff --git a/server.sh b/server.sh index 1c301be..1fcd21b 100755 --- a/server.sh +++ b/server.sh @@ -10,14 +10,15 @@ # docker run --device=/dev/tty0:rw -it --rm --gpus all \ docker run --privileged -it --rm --gpus all \ -p 6080:8081 \ + -p 5901:5901 \ -p 2000-2002:2000-2002 \ -v /dev/shm:/dev/shm \ -e NVIDIA_VISIBLE_DEVICES=all \ - -e NVIDIA_DRIVER_CAPABILITIES=all \ + -e NVIDIA_DRIVER_CAPABILITIES=compute,graphics,display \ -e QT_X11_NO_MITSHM=1 \ -e SDL_VIDEODRIVER=x11 \ -e VNCPASS=pass \ -e RESOLUTION=1920x1080 \ - --shm-size=1gb \ + --shm-size=512mb \ --net bridge \ --name sim sim