Skip to content

Commit

Permalink
Adds python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
robballantyne committed Nov 30, 2023
1 parent f2c9fe4 commit 620808c
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 13 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
UBUNTU_VERSION: 22.04
BUILDX_NO_DEFAULT_ATTESTATIONS: 1
LATEST_CUDA: "all-cuda-11.8.0-cudnn8-runtime-22.04"
LATEST_ROCM: "all-rocm-5.4.2-runtime-22.04"
LATEST_ROCM: "all-rocm-5.6-runtime-22.04"
LATEST_CPU: "all-cpu-22.04"

jobs:
Expand All @@ -24,6 +24,7 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "all"
steps:
-
Expand Down Expand Up @@ -84,6 +85,7 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "all"
cuda:
- "11.7.1"
Expand Down Expand Up @@ -159,6 +161,7 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "all"
rocm:
- "5.4.2"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Tags follow these patterns:
##### _ROCm_
- `:[python-version]-rocm-[x.x.x]-[core|runtime|devel]-[ubuntu-version]`

- `:latest-rocm` -> `:all-rocm-5.4.2-runtime-22.04`
- `:latest-rocm` -> `:all-rocm-5.6-runtime-22.04`

ROCm builds are experimental. Please give feedback.

Expand All @@ -47,7 +47,7 @@ Browse [here](https://github.com/ai-dock/jupyter-python/pkgs/container/jupyter-p

You can also self-build from source by editing `.env` and running `docker compose build`.

Supported Python versions: `all` `3.11`, `3.10`, `3.9`, `3.8`, `2.7`
Supported Python versions: `all`, `3.12`, `3.11`, `3.10`, `3.9`, `3.8`, `2.7`

Supported Platforms: `NVIDIA CUDA`, `AMD ROCm`, `CPU`

Expand Down
7 changes: 7 additions & 0 deletions build/COPY_ROOT/opt/ai-dock/bin/build/layer0/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ install_ipykernel() {
else
do_kernel_install "python_311" "3.11"
fi

do_mamba_install "python_312"
if [[ $PYTHON_MAMBA_NAME = "python_312" ]]; then
do_kernel_install "python_312" "3.12" "python3" "Python3 (ipykernel)"
else
do_kernel_install "python_312" "3.12"
fi
fi
}

Expand Down
23 changes: 13 additions & 10 deletions build/COPY_ROOT/opt/ai-dock/bin/supervisor-jupyter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,28 @@

trap cleanup EXIT

LISTEN_PORT=18888
METRICS_PORT=28888
PROXY_SECURE=true

function cleanup() {
kill $(jobs -p) > /dev/null 2>&1
rm /run/http_ports/$PROXY_PORT > /dev/null 2>&1
}

function start() {
if [[ -z $JUPYTER_MODE || ! "$JUPYTER_MODE" = "notebook" ]]; then
JUPYTER_MODE="notebook"
LISTEN_PORT=${JUPYTER_PORT_LOCAL:-18888}
METRICS_PORT=${JUPYTER_METRICS_PORT:-28888}
PROXY_SECURE=true

if [[ ! -v JUPYTER_PORT || -z $JUPYTER_PORT ]]; then
JUPYTER_PORT=${JUPYTER_PORT_HOST:-8888}
fi
PROXY_PORT=$JUPYTER_PORT

if [[ -z $JUPYTER_PORT ]]; then
JUPYTER_PORT=8888
if [[ ! -v JUPYTER_MODE || -z $JUPYTER_MODE ]]; then
JUPYTER_MODE="notebook"
fi
if [[ $JUPYTER_MODE != "notebook" ]]; then
JUPYTER_MODE="lab"
fi

PROXY_PORT=$JUPYTER_PORT
SERVICE_NAME="Jupyter ${JUPYTER_MODE^}"

if [[ ${SERVERLESS,,} = "true" ]]; then
Expand Down Expand Up @@ -78,7 +81,7 @@ function start() {
--ServerApp.allow_credentials=True \
--ServerApp.root_dir=$WORKSPACE \
--ServerApp.preferred_dir=$WORKSPACE \
--KernelSpecManager.ensure_native_kernel=False
--KernelSpecManager.ensure_native_kernel=False
}

start 2>&1

0 comments on commit 620808c

Please sign in to comment.