From 9e5167e7bc5b452996f91bf46c063a3bc274e906 Mon Sep 17 00:00:00 2001 From: Sebastian <sebastian.karius@informatik.uni-halle.de> Date: Thu, 17 Oct 2024 14:06:24 +0200 Subject: [PATCH] allow sudo --- docker/coder-med/Dockerfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docker/coder-med/Dockerfile b/docker/coder-med/Dockerfile index 77b84c2..32e3b5d 100644 --- a/docker/coder-med/Dockerfile +++ b/docker/coder-med/Dockerfile @@ -1,6 +1,8 @@ FROM nvidia/cuda:12.6.2-devel-ubuntu24.04 LABEL authors="sebastian" +USER root + ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get upgrade -y @@ -45,10 +47,16 @@ RUN apt-get install -y \ RUN useradd -ms /bin/bash coder RUN usermod -aG sudo coder +# allow sudo without password +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + # clean up RUN apt-get clean RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* # switch to coder user USER coder -WORKDIR /home/coder \ No newline at end of file +WORKDIR /home/coder + +# add .local/bin to PATH to be able to directly call python modules installed by pipx +ENV PATH="${PATH}:/home/coder/.local/bin" \ No newline at end of file -- GitLab