File tree Expand file tree Collapse file tree 5 files changed +14
-16
lines changed Expand file tree Collapse file tree 5 files changed +14
-16
lines changed Original file line number Diff line number Diff line change 1
1
# This is a GitHub workflow defining a set of jobs with a set of steps.
2
- # ref: https://docs.github.com/en/free-pro-team@latest/ actions/reference /workflow-syntax-for-github-actions
2
+ # ref: https://docs.github.com/en/actions/using-workflows /workflow-syntax-for-github-actions
3
3
#
4
4
name : Tests
5
5
@@ -15,14 +15,15 @@ jobs:
15
15
# https://github.com/pre-commit/action
16
16
pre-commit :
17
17
name : Lint
18
- runs-on : ubuntu-latest
18
+ runs-on : ubuntu-22.04
19
19
steps :
20
20
- uses : actions/checkout@v3
21
21
- uses : actions/setup-python@v4
22
22
- uses : pre-commit/action@v3.0.0
23
23
24
24
# Run tests
25
25
test :
26
+ name : Test
26
27
runs-on : ubuntu-22.04
27
28
timeout-minutes : 10
28
29
strategy :
47
48
run : cat ci/config_token.py >> ${{ matrix.example }}/jupyterhub_config.py
48
49
49
50
- name : Run JupyterHub
50
- run : |
51
- cd ${{ matrix.example }}
52
- docker-compose up -d
51
+ working-directory : ${{ matrix.example }}
52
+ run : docker-compose up --detach
53
53
54
54
- name : Test
55
- run : |
56
- cd ${{ matrix.example }}
57
- pytest -vs
55
+ working-directory : ${{ matrix.example }}
56
+ run : pytest --verbose --capture=no
Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ ARG JUPYTERHUB_VERSION
4
4
FROM jupyterhub/jupyterhub:$JUPYTERHUB_VERSION
5
5
6
6
# Install dockerspawner, nativeauthenticator
7
+ # hadolint ignore=DL3013
7
8
RUN python3 -m pip install --no-cache-dir \
8
- dockerspawner==12.* \
9
- jupyterhub-nativeauthenticator==1.*
9
+ dockerspawner \
10
+ jupyterhub-nativeauthenticator
10
11
11
- COPY ./jupyterhub_config.py /srv/jupyterhub/jupyterhub_config.py
12
12
CMD ["jupyterhub", "-f", "/srv/jupyterhub/jupyterhub_config.py"]
Original file line number Diff line number Diff line change @@ -32,13 +32,11 @@ services:
32
32
# All containers will join this network
33
33
DOCKER_NETWORK_NAME : jupyterhub-network
34
34
# JupyterHub will spawn this Notebook image for users
35
- DOCKER_NOTEBOOK_IMAGE : jupyter/minimal -notebook:latest
35
+ DOCKER_NOTEBOOK_IMAGE : jupyter/base -notebook:latest
36
36
# Notebook directory inside user image
37
37
DOCKER_NOTEBOOK_DIR : /home/jovyan/work
38
38
# Using this run command
39
39
DOCKER_SPAWN_CMD : start-singleuser.sh
40
- command : >
41
- jupyterhub -f /srv/jupyterhub/jupyterhub_config.py
42
40
43
41
volumes :
44
42
jupyterhub-data :
Original file line number Diff line number Diff line change 30
30
c .DockerSpawner .network_name = network_name
31
31
32
32
# Explicitly set notebook directory because we'll be mounting a volume to it.
33
- # Most jupyter/docker-stacks *-notebook images run the Notebook server as
33
+ # Most ` jupyter/docker-stacks` *-notebook images run the Notebook server as
34
34
# user `jovyan`, and set the notebook directory to `/home/jovyan/work`.
35
35
# We follow the same convention.
36
- notebook_dir = os .environ .get ("DOCKER_NOTEBOOK_DIR" ) or "/home/jovyan/work"
36
+ notebook_dir = os .environ .get ("DOCKER_NOTEBOOK_DIR" , "/home/jovyan/work" )
37
37
c .DockerSpawner .notebook_dir = notebook_dir
38
38
39
39
# Mount the real user's Docker volume on the host to the notebook user's
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ while [ $count -lt 60 ]; do
13
13
printf .
14
14
count=$(( count+ 1 ))
15
15
done
16
+
16
17
if [ $started -eq 0 ]; then
17
18
echo " *****"
18
19
echo " JupyterHub did not start"
You can’t perform that action at this time.
0 commit comments