diff --git a/.github/workflows/build-docker-images.yml b/.github/workflows/build-docker-images.yml index 3f64fc8..2f064e8 100644 --- a/.github/workflows/build-docker-images.yml +++ b/.github/workflows/build-docker-images.yml @@ -39,3 +39,15 @@ jobs: run: docker build ./proxy --tag ghcr.io/steffo99/sophon-proxy:latest - name: "Upload the container to GitHub Containers" run: docker push ghcr.io/steffo99/sophon-proxy:latest + build-jupyter: + name: "Build jupyter image" + runs-on: ubuntu-latest + steps: + - name: "Checkout repository" + uses: actions/checkout@v2 + - name: "Login to GitHub Containers" + run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u Steffo99 --password-stdin + - name: "Build the docker container `ghcr.io/steffo99/sophon-jupyter:latest`" + run: docker build ./jupyter --tag ghcr.io/steffo99/sophon-jupyter:latest + - name: "Upload the container to GitHub Containers" + run: docker push ghcr.io/steffo99/sophon-jupyter:latest diff --git a/jupyter/Dockerfile b/jupyter/Dockerfile new file mode 100644 index 0000000..50bdf31 --- /dev/null +++ b/jupyter/Dockerfile @@ -0,0 +1,27 @@ +# Modified jupyter/scipy-notebook for better integration with Sophon + +# Override the default "jovyan" user +ARG NB_USER="sophon" + +# Set the base image of the notebook +FROM jupyter/scipy-notebook + +# Image labels +LABEL maintainer="Stefano Pigozzi " + +# As the default user... +USER ${NB_UID} +WORKDIR "${HOME}" + +# Install the JupyterLab Sophon theme +RUN jupyter labextension install "jupyterlab_theme_sophon" +# Enable the JupyterLab Sophon theme +RUN jupyter labextension enable "jupyter_theme_sophon" +# Set the JupyterLab Sophon theme as default +RUN mkdir -p '.jupyter/lab/user-settings/@jupyterlab/apputils-extension/' +RUN echo '{"theme": "JupyterLab Sophon"}' > ".jupyter/lab/user-settings/@jupyterlab/apputils-extension/themes.jupyterlab-settings" + +# Set useful envvars for Sophon notebooks +ENV JUPYTER_ENABLE_LAB=yes +ENV RESTARTABLE=yes +ENV GRANT_SUDO=yes