Skip to content

Commit 11311b6

Browse files
authored
chore: add jupyter-server-proxy (#15)
1 parent 82b9294 commit 11311b6

6 files changed

Lines changed: 13 additions & 42 deletions

File tree

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
features:
1616
- renku
1717
baseImage:
18-
- python:3.10
18+
- python:3.10.15
1919
- mcr.microsoft.com/devcontainers/python:3.10
2020
- ubuntu:focal
2121
- mcr.microsoft.com/devcontainers/base:ubuntu

src/renku/devcontainer-feature.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@
2929
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
3030
"packages": "build-essential,bzip2,ca-certificates,curl,gpg-agent,gnupg,libglib2.0-0,libsm6,libxext6,libxrender1,rclone,tini,wget,vim,jq"
3131
},
32-
"ghcr.io/devcontainers/features/python:1": {
33-
"version": "3.10"
32+
"ghcr.io/devcontainers/features/python:1.3": {
33+
"version": "3.10.15",
34+
"installTools": true,
35+
"toolsToInstall": "pipx"
3436
},
3537
"ghcr.io/rocker-org/devcontainer-features/miniforge:1": {},
3638
"ghcr.io/devcontainers/features/git:1": {},

src/renku/install.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,16 @@ fi
1313
echo "The requested version is: $VERSION"
1414

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

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

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

2928
chown -R ${USERNAME} /usr/local/py-utils

test/renku/renku-ubuntu-randomUser.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ check "conda is available" bash -c "conda --version"
1313
check "/opt/conda/bin is on PATH" bash -c "grep -q '/opt/conda/bin' <<< '$PATH'"
1414
check "jupyter notebook works" bash -c "jupyter notebook --help"
1515

16-
# check that the user is indeed jovyan
17-
check "user is jovyan" bash -c "whoami | grep jovyan"
18-
1916
# Report results
2017
# If any of the checks above exited with a non-zero exit code, the test will fail.
2118
reportResults

test/renku/scenarios.json

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,16 @@
22
"renku-base-notebook": {
33
"image": "jupyter/base-notebook:python-3.10",
44
"features": {
5-
"renku": {}
6-
},
7-
"remoteUser": "jovyan"
8-
},
9-
"renku-ubuntu-jovyan": {
10-
"image": "ubuntu",
11-
"features": {
12-
"renku": {}
5+
"renku": {
6+
"createUser": false
7+
}
138
},
149
"remoteUser": "jovyan"
1510
},
16-
"renku-ubuntu-randomUser": {
11+
"renku-ubuntu": {
1712
"image": "ubuntu",
1813
"features": {
1914
"renku": {}
20-
},
21-
"remoteUser": "randomUser"
15+
}
2216
}
2317
}

0 commit comments

Comments
 (0)