From c3d1d0685039e4ed26c693751a37613de1d97072 Mon Sep 17 00:00:00 2001 From: Drew Yang Date: Tue, 2 Jul 2024 14:08:44 -0500 Subject: [PATCH 1/9] =?UTF-8?q?fix:=20=F0=9F=90=9B=20remove=20popup=20|=20?= =?UTF-8?q?add=20singleuser=20image=20build=20and=20publish?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/singleuser-release.yaml | 19 +++++++++++++++---- singleuser/Dockerfile | 4 +++- singleuser/config/jupyter_server_config.py | 8 ++++---- singleuser/config/page_config.json | 5 +++++ singleuser/config/pip_requirements.txt | 2 +- 5 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 singleuser/config/page_config.json diff --git a/.github/workflows/singleuser-release.yaml b/.github/workflows/singleuser-release.yaml index 3e61bb6..b47bd94 100644 --- a/.github/workflows/singleuser-release.yaml +++ b/.github/workflows/singleuser-release.yaml @@ -1,4 +1,4 @@ -name: singleuser-relase-wip +name: singleuser-relase on: workflow_dispatch: inputs: @@ -7,8 +7,10 @@ on: default: '4.0.2' type: choice options: + - '5.0.0' - '4.0.2' - '1.4.2' + jobs: release-image: runs-on: ubuntu-latest @@ -16,6 +18,7 @@ jobs: matrix: include: # following python version end of life: https://devguide.python.org/versions/ + - py_ver: '3.11' - py_ver: '3.10' - py_ver: '3.9' - py_ver: '3.8' @@ -23,6 +26,14 @@ jobs: PY_VER: ${{matrix.py_ver}} JUPYTERHUB_VER: ${{github.event.inputs.jupyterhub_version}} steps: - - uses: actions/checkout@v4 - # TODO - use docker build action - # TODO - use conventional commit action to make release and changelog + - uses: actions/checkout@ + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{secrets.DOCKERHUB_USERNAME}} + password: ${{secrets.DOCKERHUB_TOKEN}} + - run: | + cd singleuser + docker compose build + export IMAGE_TAG=$(eval "echo \"$(cat docker-compose.yaml | grep image: | awk '{ print $2 }' | grep singleuser)\"") + docker push $IMAGE_TAG diff --git a/singleuser/Dockerfile b/singleuser/Dockerfile index 314497e..4a3bb1a 100644 --- a/singleuser/Dockerfile +++ b/singleuser/Dockerfile @@ -16,7 +16,9 @@ RUN \ && cp /tmp/config/before_start_hook.sh /usr/local/bin/before-notebook.d/ \ && chmod +x /usr/local/bin/before-notebook.d/before_start_hook.sh \ # Add jupyter*config*.py - && cp /tmp/config/jupyter*config*.py /etc/jupyter/ + && cp /tmp/config/jupyter*config*.py /etc/jupyter/ \ + && mkdir /etc/jupyter/labconfig/ \ + && cp /tmp/config/*.json /etc/jupyter/labconfig/ USER $NB_UID RUN \ diff --git a/singleuser/config/jupyter_server_config.py b/singleuser/config/jupyter_server_config.py index 459ff23..58513d4 100644 --- a/singleuser/config/jupyter_server_config.py +++ b/singleuser/config/jupyter_server_config.py @@ -88,7 +88,7 @@ def scrub_output_pre_save(model, **kwargs): "JUPYTER_FILE_CONTENTS_MANAGER_ROOT_DIR", "/home/jovyan" ) -## Jupyter collaboration extension -c.YDocExtension.disable_rtc = ( - os.getenv("JUPYTER_YDOCEXTENSION_DISABLE_RTC", "FALSE").upper() == "TRUE" -) +# ## Jupyter collaboration extension +# c.YDocExtension.disable_rtc = ( +# os.getenv("JUPYTER_YDOCEXTENSION_DISABLE_RTC", "FALSE").upper() == "TRUE" +# ) diff --git a/singleuser/config/page_config.json b/singleuser/config/page_config.json new file mode 100644 index 0000000..f0a0dc3 --- /dev/null +++ b/singleuser/config/page_config.json @@ -0,0 +1,5 @@ +{ + "disabledExtensions": { + "@jupyterlab/apputils-extension:announcements": true + } +} \ No newline at end of file diff --git a/singleuser/config/pip_requirements.txt b/singleuser/config/pip_requirements.txt index aaab5ca..e1e3589 100644 --- a/singleuser/config/pip_requirements.txt +++ b/singleuser/config/pip_requirements.txt @@ -1,2 +1,2 @@ gh -jupyter-collaboration \ No newline at end of file +# jupyter-collaboration \ No newline at end of file From aadbc01fec6fa307d83ad6ee1ed9a2d58e09cdce Mon Sep 17 00:00:00 2001 From: Drew Yang Date: Tue, 2 Jul 2024 14:10:35 -0500 Subject: [PATCH 2/9] =?UTF-8?q?fix:=20=F0=9F=90=9B=20fix=20indent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/singleuser-release.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/singleuser-release.yaml b/.github/workflows/singleuser-release.yaml index b47bd94..9779173 100644 --- a/.github/workflows/singleuser-release.yaml +++ b/.github/workflows/singleuser-release.yaml @@ -33,7 +33,7 @@ jobs: username: ${{secrets.DOCKERHUB_USERNAME}} password: ${{secrets.DOCKERHUB_TOKEN}} - run: | - cd singleuser - docker compose build - export IMAGE_TAG=$(eval "echo \"$(cat docker-compose.yaml | grep image: | awk '{ print $2 }' | grep singleuser)\"") - docker push $IMAGE_TAG + cd singleuser + docker compose build + export IMAGE_TAG=$(eval "echo \"$(cat docker-compose.yaml | grep image: | awk '{ print $2 }' | grep singleuser)\"") + docker push $IMAGE_TAG From e430585e52f87e46bbd3ffd0ffc1b4e36d54e988 Mon Sep 17 00:00:00 2001 From: Drew Yang Date: Tue, 2 Jul 2024 14:11:38 -0500 Subject: [PATCH 3/9] =?UTF-8?q?fix:=20=F0=9F=90=9B=20missing=20checkout=20?= =?UTF-8?q?version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/singleuser-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/singleuser-release.yaml b/.github/workflows/singleuser-release.yaml index 9779173..ba5fdb8 100644 --- a/.github/workflows/singleuser-release.yaml +++ b/.github/workflows/singleuser-release.yaml @@ -26,7 +26,7 @@ jobs: PY_VER: ${{matrix.py_ver}} JUPYTERHUB_VER: ${{github.event.inputs.jupyterhub_version}} steps: - - uses: actions/checkout@ + - uses: actions/checkout@4 - name: Login to Docker Hub uses: docker/login-action@v2 with: From 92085eb30db56e4996d52fce4f754c2a5bde747e Mon Sep 17 00:00:00 2001 From: Drew Yang Date: Tue, 2 Jul 2024 14:12:31 -0500 Subject: [PATCH 4/9] =?UTF-8?q?fix:=20=F0=9F=90=9B=20typo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/singleuser-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/singleuser-release.yaml b/.github/workflows/singleuser-release.yaml index ba5fdb8..58ad58d 100644 --- a/.github/workflows/singleuser-release.yaml +++ b/.github/workflows/singleuser-release.yaml @@ -26,7 +26,7 @@ jobs: PY_VER: ${{matrix.py_ver}} JUPYTERHUB_VER: ${{github.event.inputs.jupyterhub_version}} steps: - - uses: actions/checkout@4 + - uses: actions/checkout@3 - name: Login to Docker Hub uses: docker/login-action@v2 with: From df590d8f361ba3ca0414f85cef105b5f3287cced Mon Sep 17 00:00:00 2001 From: Drew Yang Date: Tue, 2 Jul 2024 14:13:07 -0500 Subject: [PATCH 5/9] =?UTF-8?q?fix:=20=F0=9F=90=9B=20typo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/singleuser-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/singleuser-release.yaml b/.github/workflows/singleuser-release.yaml index 58ad58d..350bae3 100644 --- a/.github/workflows/singleuser-release.yaml +++ b/.github/workflows/singleuser-release.yaml @@ -26,7 +26,7 @@ jobs: PY_VER: ${{matrix.py_ver}} JUPYTERHUB_VER: ${{github.event.inputs.jupyterhub_version}} steps: - - uses: actions/checkout@3 + - uses: actions/checkout@v4 - name: Login to Docker Hub uses: docker/login-action@v2 with: From dc1111d9e991ac000a51fb5760629811bfead71c Mon Sep 17 00:00:00 2001 From: Drew Yang Date: Tue, 2 Jul 2024 14:17:14 -0500 Subject: [PATCH 6/9] =?UTF-8?q?fix:=20=F0=9F=90=9B=20copilot=20imperfectio?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/singleuser-release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/singleuser-release.yaml b/.github/workflows/singleuser-release.yaml index 350bae3..70d2a88 100644 --- a/.github/workflows/singleuser-release.yaml +++ b/.github/workflows/singleuser-release.yaml @@ -23,8 +23,8 @@ jobs: - py_ver: '3.9' - py_ver: '3.8' env: - PY_VER: ${{matrix.py_ver}} - JUPYTERHUB_VER: ${{github.event.inputs.jupyterhub_version}} + PY_VERSION: ${{matrix.py_ver}} + JUPYTERHUB_VERSION: ${{github.event.inputs.jupyterhub_version}} steps: - uses: actions/checkout@v4 - name: Login to Docker Hub From ca4db7d8e5976716d3dcd81de49160152f76f461 Mon Sep 17 00:00:00 2001 From: Drew Yang Date: Tue, 2 Jul 2024 14:19:58 -0500 Subject: [PATCH 7/9] =?UTF-8?q?fix:=20=F0=9F=90=9B=20build=20refer=20env?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- singleuser/docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/singleuser/docker-compose.yaml b/singleuser/docker-compose.yaml index 103e7de..75606d6 100644 --- a/singleuser/docker-compose.yaml +++ b/singleuser/docker-compose.yaml @@ -10,7 +10,7 @@ services: container_name: djlabhub-singleuser env_file: .env ports: - - $JUPYTER_SERVER_APP_PORT:$JUPYTER_SERVER_APP_PORT + - ${JUPYTER_SERVER_APP_PORT:-8889}:${JUPYTER_SERVER_APP_PORT:-8889} volumes: - ./config/before_start_hook.sh:/usr/local/bin/before-notebook.d/before_start_hook.sh - ./config/jupyter_server_config.py:/etc/jupyter/jupyter_server_config.py From dfd565c5b73c6cf2c31c80bd8797188ad286bb01 Mon Sep 17 00:00:00 2001 From: Drew Yang Date: Tue, 2 Jul 2024 14:21:07 -0500 Subject: [PATCH 8/9] =?UTF-8?q?fix:=20=F0=9F=90=9B=20remove=20legacy=20ver?= =?UTF-8?q?sion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/singleuser-release.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/singleuser-release.yaml b/.github/workflows/singleuser-release.yaml index 70d2a88..48070b3 100644 --- a/.github/workflows/singleuser-release.yaml +++ b/.github/workflows/singleuser-release.yaml @@ -9,7 +9,6 @@ on: options: - '5.0.0' - '4.0.2' - - '1.4.2' jobs: release-image: From 855c16f9d731f7bac9f8a30c2cc80af5917c1e9d Mon Sep 17 00:00:00 2001 From: Drew Yang Date: Tue, 2 Jul 2024 14:22:28 -0500 Subject: [PATCH 9/9] =?UTF-8?q?fix:=20=F0=9F=90=9B=20copilot=20imperfectio?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/singleuser-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/singleuser-release.yaml b/.github/workflows/singleuser-release.yaml index 48070b3..3810f5b 100644 --- a/.github/workflows/singleuser-release.yaml +++ b/.github/workflows/singleuser-release.yaml @@ -22,7 +22,7 @@ jobs: - py_ver: '3.9' - py_ver: '3.8' env: - PY_VERSION: ${{matrix.py_ver}} + PYTHON_VERSION: ${{matrix.py_ver}} JUPYTERHUB_VERSION: ${{github.event.inputs.jupyterhub_version}} steps: - uses: actions/checkout@v4