diff --git a/Dockerfile b/Dockerfile index f4bbb34..5e7e99b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,27 @@ -FROM ubuntu:18.04 +#FROM ubuntu:18.04 +FROM nvidia/vulkan:1.1.121-cuda-10.1--ubuntu18.04 # Make all NVIDIA GPUS visible, but I want to manually install drivers ARG NVIDIA_VISIBLE_DEVICES=all # Supress interactive menu while installing keyboard-configuration ARG DEBIAN_FRONTEND=noninteractive +RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; + +# add new sudo user +ENV USERNAME kbkn +ENV HOME /home/$USERNAME +RUN useradd -m $USERNAME && \ + echo "$USERNAME:$USERNAME" | chpasswd && \ + usermod --shell /bin/bash $USERNAME && \ + usermod -aG sudo $USERNAME && \ + mkdir /etc/sudoers.d && \ + echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/$USERNAME && \ + chmod 0440 /etc/sudoers.d/$USERNAME && \ + # Replace 1000 with your user/group id + usermod --uid 1000 $USERNAME && \ + groupmod --gid 1000 $USERNAME + # Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Failed to execute child process dbus-launch (No such file or directory) # fix by setting LANG https://askubuntu.com/questions/608330/problem-with-gnome-terminal-on-gnome-3-12-2 # to install locales https://stackoverflow.com/questions/39760663/docker-ubuntu-bin-sh-1-locale-gen-not-found diff --git a/server.sh b/server.sh index 110d589..b91ed40 100755 --- a/server.sh +++ b/server.sh @@ -2,7 +2,7 @@ docker build -t sim . && \ # docker run --device=/dev/tty0:rw -it --rm --gpus all \ docker run --privileged -it --rm --gpus all \ - -p 8081:8081 \ + -p 6080:8081 \ -e RESOLUTION=1920x1080 \ -e VNCPASS=pass \ --name sim sim