Here are several things to check to make sure you are ready for the summer school.
Attendee Checklist
Download and install the FermiBottle following the instructions on https://github.com/fermi-lat/FermiBottle/wiki
Start and attach to the container following the instructions.
One in the container
Check that X-windows works by launching ds9
Checking the shared directory. Make sure changes are visible in both container and system OS.
Activate the 'fermi' environment with conda.
Check that Jupyter notebooks work.
Check that fermitools work.
We've created a short Jupyter notebook that will help with this.
Example Run Through
Here's an example session on a Mac. I create a directory called "fermi_summer_school" (its name does not matter) and a file in it called "this_is_the_share_directory" just so something shows up with an "ls". This directory will be visible from the container. I then create a new container from the FermiBottle image pulled from Docker and start it.
(base) user@host % mkdir fermi_summer_school (base) user@host % cd fermi_summer_school (base) user@host fermi_summer_school % docker pull fssc/fermibottle Pulling from fssc/fermibottle Digest: sha256:f041b634d1b3a6d3a4e3276c8bac486de47a1839365c0a0826569da40c5a9b47 Status: Image is up to date for fssc/fermibottle docker.io/fssc/fermibottle (base) user@host fermi_summer_school % touch this_is_the_share_directory (base) user@host fermi_summer_school % ls this_is_the_share_directory (base) user@host fermi_summer_school % xhost + 127.0.0.1 && \ docker create -it --init \ -e HOST_USER_ID=`id -u $USER` \ -e DISPLAY=host.docker.internal:0 \ -v "`pwd`":/data \ -p 8888:8888 \ fssc/fermibottle 127.0.0.1 being added to access control list be68136958ad303810707e78b08080c20490fcdc2ee4b061fb46f464b997e7a4 (base) user@host fermi_summer_school % docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES be68136958ad fssc/fermibottle "/opt/docker/bin/ent…" 19 seconds ago Created silly_pasteur (base) user@host fermi_summer_school % docker start be68136958ad be68136958ad (base) user@host fermi_summer_school % docker attach be68136958ad
This puts me in the container. You should notice that the prompt is now the "fermi" user and the container ID. I launch ds9 to make sure X-windows are working. Quit it (assuming it works) and change to the share directory, which is under '/data/' in the container.
(base) [fermi@be68136958ad ~]$ ds9 (base) [fermi@be68136958ad ~]$ cd /data (base) [fermi@be68136958ad data]$ ls this_is_the_share_directory
Back on the host system, download the file Quick_Test.zip and put it in the shared directory. Then unzip it which will create a directory.
(base) user@host fermi_summer_school % unzip Quick_Test.zip Archive: Quick_Test.zip creating: Quick_Test/ inflating: Quick_Test/Quick_Test.ipynb inflating: Quick_Test/SC00.fits inflating: Quick_Test/3C279_1deg_gti.fits (base) user@host fermi_summer_school % ls Quick_Test/ Quick_Test.zip this_is_the_share_directory
In the container, you should see the change:
(base) [fermi@be68136958ad data]$ ls Quick_Test Quick_Test.zip this_is_the_share_directory
Now start the "fermi" environment and the Jupyter notebook server:
(base) [fermi@be68136958ad data]$ conda activate fermi (fermi) [fermi@be68136958ad data]$ cd Quick_Test (fermi) [fermi@be68136958ad Quick_Test]$ ls 3C279_1deg_gti.fits 3C279_1deg_lc.fits Quick_Test.ipynb SC00.fits (fermi) [fermi@be68136958ad data]$ notebook [I 19:02:00.683 NotebookApp] Loading IPython parallel extension [I 19:02:00.685 NotebookApp] Serving notebooks from local directory: /data [I 19:02:00.685 NotebookApp] Jupyter Notebook 6.3.0 is running at: [I 19:02:00.685 NotebookApp] http://00.00.00.00:8888/?token=f1c9ca8c84b17e3ebbd6394eaab36aab1a9ee52d61092436 [I 19:02:00.685 NotebookApp] or http://127.0.0.1:8888/?token=f1c9ca8c84b17e3ebbd6394eaab36aab1a9ee52d61092436 [I 19:02:00.685 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 19:02:00.689 NotebookApp] To access the notebook, open this file in a browser: file:///home/fermi/.local/share/jupyter/runtime/nbserver-606-open.html Or copy and paste one of these URLs: http://00.00.00.00:8888/?token=f1c9ca8c84b17e3ebbd6394eaab36aab1a9ee52d61092436 or http://127.0.0.1:8888/?token=f1c9ca8c84b17e3ebbd6394eaab36aab1a9ee52d61092436
You can paste one of the http URL into the browser on your host machine and should see something like:
Click on the Quick_test.ipynb file to open it. You can then run the notebook by select Cell->Run All from the menu. You should then end up with a lightcurve plot.