Skip to content

Commit

Permalink
Merge pull request #45 from yambottle/master
Browse files Browse the repository at this point in the history
DEV-614 remove announcement popup | include singleuser build and push GHA
  • Loading branch information
ethho authored Jul 2, 2024
2 parents 9e6b7a3 + 855c16f commit 0cd58c9
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 13 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/singleuser-release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: singleuser-relase-wip
name: singleuser-relase
on:
workflow_dispatch:
inputs:
Expand All @@ -7,22 +7,32 @@ on:
default: '4.0.2'
type: choice
options:
- '5.0.0'
- '4.0.2'
- '1.4.2'

jobs:
release-image:
runs-on: ubuntu-latest
strategy:
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'
env:
PY_VER: ${{matrix.py_ver}}
JUPYTERHUB_VER: ${{github.event.inputs.jupyterhub_version}}
PYTHON_VERSION: ${{matrix.py_ver}}
JUPYTERHUB_VERSION: ${{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
- 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
4 changes: 3 additions & 1 deletion singleuser/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
8 changes: 4 additions & 4 deletions singleuser/config/jupyter_server_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
# )
5 changes: 5 additions & 0 deletions singleuser/config/page_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"disabledExtensions": {
"@jupyterlab/apputils-extension:announcements": true
}
}
2 changes: 1 addition & 1 deletion singleuser/config/pip_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
gh
jupyter-collaboration
# jupyter-collaboration
2 changes: 1 addition & 1 deletion singleuser/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0cd58c9

Please sign in to comment.