Skip to content
Snippets Groups Projects
Commit 19c60925 authored by Sebastian Karius's avatar Sebastian Karius
Browse files

switch to preinstalled ubuntu user

parent 51568bf5
No related branches found
No related tags found
No related merge requests found
FROM ubuntu:24.04
LABEL authors="sebastian"
SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get upgrade -y
......@@ -42,23 +40,21 @@ RUN apt-get install -y htop \
pv \
brotli
# create coder user
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
# add ubuntu user to sudo
RUN usermod -aG sudo ubuntu
# allow sudo without password
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# switch to ubuntu user
USER ubuntu
WORKDIR /home/ubuntu
# activate miniconda
RUN source /opt/miniconda3/bin/activate
RUN /opt/miniconda3/bin/conda init --all
ENV PATH="${PATH}:/opt/miniconda3/bin"
......@@ -66,7 +62,7 @@ ENV PATH="${PATH}:/opt/miniconda3/bin"
ENV PATH="${PATH}:/opt/poetry/bin"
# add .local/bin to PATH to be able to directly call python modules installed by pipx
ENV PATH="${PATH}:/home/coder/.local/bin"
ENV PATH="${PATH}:/home/ubuntu/.local/bin"
# prevent tensorflow from allocation all vram
ENV TF_FORCE_GPU_ALLOW_GROWTH=true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment