From 59f7db27c2fe1cca346439fc3d6c7fa20f7c1ec3 Mon Sep 17 00:00:00 2001 From: Abdu Zoghbi <32649422+zoghbi-a@users.noreply.github.com> Date: Fri, 23 Aug 2024 16:43:09 -0400 Subject: [PATCH 1/2] Add docs for using images outside fornax --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index baa0eac..9add8a1 100644 --- a/README.md +++ b/README.md @@ -227,6 +227,36 @@ Software is installed in miniconda environments. You can use "[conda list](http ### How can I contribute to existing Open-Source Fornax notebook tutorials? * open issue or PR on Fornax Github [repo](https://github.com/nasa-fornax/fornax-demo-notebooks) +## Using Fornax Software Environments Outside Fornax +The Fornax software environments are available as docker container images. To use them on your computer, you will need to install +[docker](https://docs.docker.com/engine/install/). The following are the steps needed to run the notebooks locally using the Fornax images: + +- Start in a empty working direcotry that will be used used for the notebooks and any data generated during the analysis: +```sh +mkdir work +cd work +``` +- Clone the notebook repo: `git clone https://github.com/nasa-fornax/fornax-demo-notebooks.git`. +- Download the relevant Fornax image. In this case, we are using the `tractor-develop` image. `docker pull public.ecr.aws/f6e2z3b0/fornax-images:tractor-develop`. +- Run the image with: +``` +docker run --rm -p 8888:8888 \ + -v $(pwd):/opt/workspace:rw \ + -w /opt/workspace \ + --user root -e NB_UID=$(id -u) -e NB_GID=$(id -g) \ + -e CHOWN_HOME=yes -e CHOWN_HOME_OPTS='-R' \ + public.ecr.aws/f6e2z3b0/fornax-images:tractor-develop \ + start-notebook.sh --NotebookApp.token='' +``` + +This will launch Jupyterlab inside the container. You can access it by going to `http://127.0.0.1:8888/lab` in your browser. +the `-v` option mounts the `work` folder directory as `/opt/workspace` inside the container. The `-w` options sets `/opt/workspace` +as the working directory when jupyterlab launches. The next two lines ensures the right write permission are set so you can edit +the notebooks and save the results. + +Any files edited or created under `/opt/workspace` will be available outside the container in the `work` directory. +Any other files or changes will disapper once the running container is stopped. + ## Troubleshooting * If my internet connection goes away or is intermittent - what happens to the running notebook? * Restart kernel will solve some problems, especially if the cells were run out of order From 2db19525fccb45c560d6f2b745d8d0a31533fbbd Mon Sep 17 00:00:00 2001 From: Abdu Zoghbi Date: Thu, 5 Sep 2024 16:58:52 -0400 Subject: [PATCH 2/2] change the image from tractor-develop to tractor-stable since this is available now --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9add8a1..080f80f 100644 --- a/README.md +++ b/README.md @@ -237,7 +237,7 @@ mkdir work cd work ``` - Clone the notebook repo: `git clone https://github.com/nasa-fornax/fornax-demo-notebooks.git`. -- Download the relevant Fornax image. In this case, we are using the `tractor-develop` image. `docker pull public.ecr.aws/f6e2z3b0/fornax-images:tractor-develop`. +- Download the relevant Fornax image. In this case, we are using the `tractor-stable` image. `docker pull public.ecr.aws/f6e2z3b0/fornax-images:tractor-stable`. - Run the image with: ``` docker run --rm -p 8888:8888 \ @@ -245,7 +245,7 @@ docker run --rm -p 8888:8888 \ -w /opt/workspace \ --user root -e NB_UID=$(id -u) -e NB_GID=$(id -g) \ -e CHOWN_HOME=yes -e CHOWN_HOME_OPTS='-R' \ - public.ecr.aws/f6e2z3b0/fornax-images:tractor-develop \ + public.ecr.aws/f6e2z3b0/fornax-images:tractor-stable \ start-notebook.sh --NotebookApp.token='' ```