Skip to content

Commit

Permalink
chore: add jupyter-server-proxy (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
rokroskar authored Oct 25, 2024
1 parent 82b9294 commit 11311b6
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
features:
- renku
baseImage:
- python:3.10
- python:3.10.15
- mcr.microsoft.com/devcontainers/python:3.10
- ubuntu:focal
- mcr.microsoft.com/devcontainers/base:ubuntu
Expand Down
6 changes: 4 additions & 2 deletions src/renku/devcontainer-feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
"packages": "build-essential,bzip2,ca-certificates,curl,gpg-agent,gnupg,libglib2.0-0,libsm6,libxext6,libxrender1,rclone,tini,wget,vim,jq"
},
"ghcr.io/devcontainers/features/python:1": {
"version": "3.10"
"ghcr.io/devcontainers/features/python:1.3": {
"version": "3.10.15",
"installTools": true,
"toolsToInstall": "pipx"
},
"ghcr.io/rocker-org/devcontainer-features/miniforge:1": {},
"ghcr.io/devcontainers/features/git:1": {},
Expand Down
7 changes: 3 additions & 4 deletions src/renku/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@ fi
echo "The requested version is: $VERSION"

# create the user if missing
if ! id -u "${USERNAME}" >/dev/null 2>&1 && [ "$CREATEUSER" = "true" ]; then
if ! id -u "${USERNAME}" >/dev/null 2>&1 && [ "$CREATEUSER" = "true" ] && ! getent passwd 1000 ; then
useradd -l -m -s /bin/bash -N -u 1000 "${USERNAME}"
fi

# install jupyter
if [ "${INSTALLJUPYTER}" = "true" ]; then
/opt/conda/bin/mamba install -y jupyterlab
/opt/conda/bin/mamba install -y jupyterlab jupyter-server-proxy
ln -sf /opt/conda/bin/jupyter-server /opt/conda/bin/jupyter-notebook
fi

pip install pipx
pipx install renku==${VERSION}
/usr/local/py-utils/bin/pipx install renku==${VERSION}

chown -R ${USERNAME} /usr/local/py-utils
21 changes: 0 additions & 21 deletions test/renku/renku-ubuntu-randomUser.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ check "conda is available" bash -c "conda --version"
check "/opt/conda/bin is on PATH" bash -c "grep -q '/opt/conda/bin' <<< '$PATH'"
check "jupyter notebook works" bash -c "jupyter notebook --help"

# check that the user is indeed jovyan
check "user is jovyan" bash -c "whoami | grep jovyan"

# Report results
# If any of the checks above exited with a non-zero exit code, the test will fail.
reportResults
16 changes: 5 additions & 11 deletions test/renku/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,16 @@
"renku-base-notebook": {
"image": "jupyter/base-notebook:python-3.10",
"features": {
"renku": {}
},
"remoteUser": "jovyan"
},
"renku-ubuntu-jovyan": {
"image": "ubuntu",
"features": {
"renku": {}
"renku": {
"createUser": false
}
},
"remoteUser": "jovyan"
},
"renku-ubuntu-randomUser": {
"renku-ubuntu": {
"image": "ubuntu",
"features": {
"renku": {}
},
"remoteUser": "randomUser"
}
}
}

0 comments on commit 11311b6

Please sign in to comment.