Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/example-notebook-servers/base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ TAG ?= sha-$(GIT_COMMIT)$(GIT_TREE_STATE)

IMAGE_NAME := base

BASE_IMAGE := ubuntu:22.04
BASE_IMAGE := nvidia/cuda:12.8.1-cudnn-devel-ubuntu22.04
BASE_IMAGE_FOLDERS :=

# we use a separate registry-type cache to keep the main registry clean
Expand All @@ -32,4 +32,4 @@ CACHE_TAG ?= $(IMAGE_NAME)
ARCH ?= linux/amd64

# include build targets from common
include ../common.mk
include ../common.mk
76 changes: 33 additions & 43 deletions components/example-notebook-servers/codeserver-python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,59 +9,49 @@ ARG TARGETARCH

USER root

# args - software versions
ARG CODESERVER_PYTHON_VERSION=2023.18.0
ARG MINIFORGE_VERSION=23.3.1-1
ARG PIP_VERSION=23.2.1
ARG PYTHON_VERSION=3.11.6
# New lines for sudo, installing docker, and makefile
# https://stackoverflow.com/questions/25845538/how-to-use-sudo-inside-a-docker-container
RUN apt-get update && apt-get install -y build-essential

# setup environment for conda
ENV CONDA_DIR /opt/conda
ENV PATH "${CONDA_DIR}/bin:${PATH}"
RUN mkdir -p ${CONDA_DIR} \
&& echo ". /opt/conda/etc/profile.d/conda.sh" >> ${HOME}/.bashrc \
&& echo ". /opt/conda/etc/profile.d/conda.sh" >> /etc/profile \
&& echo "conda activate base" >> ${HOME}/.bashrc \
&& echo "conda activate base" >> /etc/profile \
&& chown -R ${NB_USER}:users ${CONDA_DIR} \
&& chown -R ${NB_USER}:users ${HOME}
# Install sudo
RUN apt-get install -y sudo

USER $NB_UID
# Install poppler
RUN apt-get install -y poppler-utils

# install - conda, pip, python
RUN case "${TARGETARCH}" in \
amd64) MINIFORGE_ARCH="x86_64" ;; \
arm64) MINIFORGE_ARCH="aarch64" ;; \
ppc64le) MINIFORGE_ARCH="ppc64le" ;; \
*) echo "Unsupported architecture: ${TARGETARCH}"; exit 1 ;; \
esac \
&& curl -fsSL "https://github.com/conda-forge/miniforge/releases/download/${MINIFORGE_VERSION}/Miniforge3-${MINIFORGE_VERSION}-Linux-${MINIFORGE_ARCH}.sh" -o /tmp/Miniforge3.sh \
&& curl -fsSL "https://github.com/conda-forge/miniforge/releases/download/${MINIFORGE_VERSION}/Miniforge3-${MINIFORGE_VERSION}-Linux-${MINIFORGE_ARCH}.sh.sha256" -o /tmp/Miniforge3.sh.sha256 \
&& echo "$(cat /tmp/Miniforge3.sh.sha256 | awk '{ print $1; }') /tmp/Miniforge3.sh" | sha256sum -c - \
&& rm /tmp/Miniforge3.sh.sha256 \
&& /bin/bash /tmp/Miniforge3.sh -b -f -p ${CONDA_DIR} \
&& rm /tmp/Miniforge3.sh \
&& conda config --system --set auto_update_conda false \
&& conda config --system --set show_channel_urls true \
&& echo "python ==${PYTHON_VERSION}" >> ${CONDA_DIR}/conda-meta/pinned \
&& conda install -y -q \
python=${PYTHON_VERSION} \
pip=${PIP_VERSION} \
&& conda update -y -q --all \
&& conda clean -a -f -y
# For opencv-python
RUN apt-get install -y libgl1 libglib2.0-0

# install - requirements.txt
COPY --chown=${NB_USER}:users requirements.txt /tmp
RUN python3 -m pip install -r /tmp/requirements.txt --quiet --no-cache-dir \
&& rm -f /tmp/requirements.txt
# Install aws-cli
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && rm -r ./aws/ && rm awscliv2.zip

# Install uv
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="$HOME/.local/bin:$PATH"

# install - codeserver extensions
# Install - codeserver extensions
ARG CODESERVER_PYTHON_VERSION=2023.18.0
RUN code-server --install-extension "ms-python.python@${CODESERVER_PYTHON_VERSION}" --force \
&& code-server --list-extensions --show-versions

# Install zsh
RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.2.1/zsh-in-docker.sh)" -- \
-p git -p zsh-autosuggestions -p zsh-syntax-highlighting

RUN git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
RUN git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
ENV ZSH_DISABLE_COMPFIX=true

# install - requirements.txt
RUN uv python install 3.11 --default --preview
RUN uv tool install 'kfp==2.4.0'

# s6 - 01-copy-tmp-home
USER root
RUN mkdir -p /tmp_home \
&& cp -r ${HOME} /tmp_home \
&& chown -R ${NB_USER}:users /tmp_home
USER $NB_UID

#USER $NB_UID
16 changes: 15 additions & 1 deletion components/example-notebook-servers/codeserver-python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,18 @@ CACHE_TAG ?= $(IMAGE_NAME)
ARCH ?= linux/amd64

# include build targets from common
include ../common.mk
include ../common.mk


IMAGE_NAME=andagi_sagemaker
ecr_url_prod="093411005699.dkr.ecr.ap-northeast-1.amazonaws.com"
repo_name=kubeflownotebookswg/codeserver-python
image_tag=v4.22.gpu.uv

# END EDITS
image_url_prod="${ecr_url_prod}/${repo_name}:${image_tag}"

push:
aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin ${ecr_url_prod}
docker push ${image_url_prod}

4 changes: 2 additions & 2 deletions components/example-notebook-servers/codeserver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM $BASE_IMG
ARG TARGETARCH

# args - software versions
ARG CODESERVER_VERSION=v4.17.1
ARG CODESERVER_VERSION=v4.21.1

USER root

Expand All @@ -27,4 +27,4 @@ RUN mkdir -p /tmp_home \

USER $NB_UID

EXPOSE 8888
EXPOSE 8888
2 changes: 1 addition & 1 deletion components/example-notebook-servers/codeserver/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ CACHE_TAG ?= $(IMAGE_NAME)
ARCH ?= linux/amd64

# include build targets from common
include ../common.mk
include ../common.mk