diff --git a/docker-compose.yml b/docker-compose.yml index af7cee3790c3b1697e54d15a29d0f4aac67488d2..5bbc378be7eebf7ed6376a682d6f139260aa32c5 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 0000000000000000000000000000000000000000..307f23715ec28723d624ed721651ca5296c45228 --- /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