From 36dc4084c89310febb4a0460c67a7c2d9e9e0de0 Mon Sep 17 00:00:00 2001 From: Sebastian <sebastian.karius@informatik.uni-halle.de> Date: Wed, 12 Feb 2025 14:19:01 +0100 Subject: [PATCH] add ubuntu 24 --- docker-compose.yml | 8 +++ docker/coder-ubuntu_24-python/Dockerfile | 66 ++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 docker/coder-ubuntu_24-python/Dockerfile diff --git a/docker-compose.yml b/docker-compose.yml index af7cee3..5bbc378 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,6 +15,14 @@ services: cache_from: - ${CI_REGISTRY}/studio-r215/containerize/coder-ubuntu-python:22 + coder-ubuntu-python-24: + image: ${CI_REGISTRY}/studio-r215/containerize/coder-ubuntu-python:24 + build: + dockerfile: Dockerfile + context: ./docker/coder-ubuntu_24-python + cache_from: + - ${CI_REGISTRY}/studio-r215/containerize/coder-ubuntu-python:24 + coder-med: image: ${CI_REGISTRY}/studio-r215/containerize/coder-med:25 build: diff --git a/docker/coder-ubuntu_24-python/Dockerfile b/docker/coder-ubuntu_24-python/Dockerfile new file mode 100644 index 0000000..307f237 --- /dev/null +++ b/docker/coder-ubuntu_24-python/Dockerfile @@ -0,0 +1,66 @@ +FROM ubuntu:24.04 +LABEL authors="sebastian" + +SHELL ["/bin/bash", "-c"] + +# prevent tensorflow from allocation all vram +ENV TF_FORCE_GPU_ALLOW_GROWTH=true + +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update && apt-get upgrade -y + +# install basic tools +RUN apt-get install -y git wget curl + +# install python, pip and venv +RUN apt-get install -y python3 python3-pip python3-venv + +# install pipx +ENV TZ=Europe/Berlin +RUN apt-get install -y pipx +RUN pipx ensurepath + +# install pipenv +RUN apt-get install -y pipenv + +# install conda +RUN mkdir -p /opt/miniconda3 +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ./miniconda.sh +RUN bash ./miniconda.sh -b -u -p /opt/miniconda3 +RUN rm ./miniconda.sh +RUN source /opt/miniconda3/bin/activate +RUN /opt/miniconda3/bin/conda init --all + +# install poetry +RUN pipx install poetry + +RUN apt-get install -y htop \ + sudo \ + unzip \ + rsync \ + vim \ + nano \ + cargo \ + tmux \ + screen \ + byobu \ + 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 .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