Docker container based on pangeo-notebook used on VEDA JupyterHub.
The notebooks in image-tests/
folder are used to test the docker image. They are run by repo2docker
github action during the build process and the output is compared to the existing notebooks. You can read more about how the tests are run in the repo2docker github action documentation.
Note that the test notebooks, by default, do not have access to private resources (eg. private S3 buckets).
To add new tests, create new notebooks or add to the existing notebooks in image-tests/
and generate the output of the notebooks by running the following command:
docker build -t pangeo-notebook-veda .
docker run -v ./image-tests:/home/jovyan/image-tests pangeo-notebook-veda jupyter nbconvert --to notebook --inplace --execute image-tests/*.ipynb
To interactively run the test notebooks in a JupiterLab environment locally, run the following command:
docker build -t pangeo-notebook-veda .
docker run -p 8888:8888 -v ./image-tests:/home/jovyan/image-tests pangeo-notebook-veda jupyter lab --ip 0.0.0.0
If you don't want to build the image yourself, you can use a pre-built image from ECR. To run the test notebooks in a JupiterLab environment locally using the pre-built image, run the following command:
docker run -p 8888:8888 -v ./image-tests:/home/jovyan/image-tests public.ecr.aws/nasa-veda/pangeo-notebook-veda-image:latest jupyter lab --ip 0.0.0.0
To run the tests locally, run the following command:
docker build -t pangeo-notebook-veda .
docker run pangeo-notebook-veda bash /srv/repo/scripts/run_tests.sh