From 0173f7f4e9383042b1f7a515b85858c13466e3d2 Mon Sep 17 00:00:00 2001 From: Austin Macdonald Date: Wed, 19 Feb 2025 17:23:41 -0600 Subject: [PATCH 1/2] Document how to create and use new single-user dandihub iimages --- docs/50_hub.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/50_hub.md b/docs/50_hub.md index a33fc139..76c87053 100644 --- a/docs/50_hub.md +++ b/docs/50_hub.md @@ -23,6 +23,22 @@ A "Base (MATLAB)" server is also available, which provides a MATLAB cloud instal If you need additional software installed in the image, you can add a server image that will be made available for all users in the `Server Options` menu. Add a server image by updating the `profileList` in the [JupyterHub config file](https://github.com/dandi/dandi-hub/blob/do-eks/helm/jupyterhub/dandihub.yaml) and submitting a pull request to the [dandi-hub repository](https://github.com/dandi/dandi-hub). Once the pull request is merged, the DANDI team will redeploy JupyterHub and the image will be available. +See https://github.com/dandi/dandi-hub/pull/233 as an example of the changes you need. + + +The following command will build and run a new image, which can be viewed locally in the browser at 127.0.0.1:8888/ + +```sh +docker build -f $(CONTAINERFILE) -t dandihub-dev:latest . +docker run --rm -p 8888:8888 --name dev_jupyterlab dandihub-dev:latest start-notebook.sh --NotebookApp.token="" +``` + +To add the new image to the test CI, and to the Dandi Archive Dockerhub, add it to the `include` +matrix of both `.github/workflows/docker-push.yaml` and `.github/workflows/docker-test.yaml`. + +You can add the image to server options by adding options to `envs/shared/jupyterhub.yaml` + + ## Example notebooks The best way to share analyses on DANDI data is through the DANDI example notebooks. From 13408a00a3421cbf66208b25e4941c875cfe1d84 Mon Sep 17 00:00:00 2001 From: Austin Macdonald Date: Mon, 24 Feb 2025 13:41:57 -0600 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Kabilar Gunalan Co-authored-by: Yaroslav Halchenko --- docs/50_hub.md | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/docs/50_hub.md b/docs/50_hub.md index 76c87053..67384599 100644 --- a/docs/50_hub.md +++ b/docs/50_hub.md @@ -21,23 +21,18 @@ A "Base (MATLAB)" server is also available, which provides a MATLAB cloud instal ## Custom server image -If you need additional software installed in the image, you can add a server image that will be made available for all users in the `Server Options` menu. Add a server image by updating the `profileList` in the [JupyterHub config file](https://github.com/dandi/dandi-hub/blob/do-eks/helm/jupyterhub/dandihub.yaml) and submitting a pull request to the [dandi-hub repository](https://github.com/dandi/dandi-hub). Once the pull request is merged, the DANDI team will redeploy JupyterHub and the image will be available. +If you need additional software installed in the image, you can add a server image that will be made available for all users in the `Server Options` menu. Add a server image by following the instructions below and submitting a pull request to the [dandi-hub repository](https://github.com/dandi/dandi-hub). Once the pull request is merged, the DANDI team will redeploy JupyterHub and the image will be available. -See https://github.com/dandi/dandi-hub/pull/233 as an example of the changes you need. - - -The following command will build and run a new image, which can be viewed locally in the browser at 127.0.0.1:8888/ +1. Fork and clone the [dandi-hub](https://github.com/dandi/dandi-hub) repository. +2. Add a Dockerfile to the [images](https://github.com/dandi/dandi-hub/tree/main/images) directory. +3. Test the Dockerfile with the following commands to build and run the new image, which can be viewed locally in the browser at 127.0.0.1:8888/ ```sh -docker build -f $(CONTAINERFILE) -t dandihub-dev:latest . +docker build -f "$(CONTAINERFILE)" -t dandihub-dev:latest . docker run --rm -p 8888:8888 --name dev_jupyterlab dandihub-dev:latest start-notebook.sh --NotebookApp.token="" ``` - -To add the new image to the test CI, and to the Dandi Archive Dockerhub, add it to the `include` -matrix of both `.github/workflows/docker-push.yaml` and `.github/workflows/docker-test.yaml`. - -You can add the image to server options by adding options to `envs/shared/jupyterhub.yaml` - +4. Add the Dockerfile to the `include` matrix of both the [docker-push.yaml](https://github.com/dandi/dandi-hub/blob/main/.github/workflows/docker-push.yaml) and [docker-test.yaml](https://github.com/dandi/dandi-hub/blob/main/.github/workflows/docker-test.yaml) files. This will allow the image to be built when new pull requests are opened and pushed to the [DANDI Archive Docker Hub](https://hub.docker.com/u/dandiarchive) when the pull requests are merged. +5. Add the image to the server options by updating the [jupyterhub.yaml](https://github.com/dandi/dandi-hub/blob/main/envs/shared/jupyterhub.yaml) file. ## Example notebooks