...
Here's an example session on a Mac. I create created a directory called "fermi_summer_school" (its name does not matter and you can create it wherever you like or use an existing directory) and a file in it called "this_is_the_share_directory" just so something shows up with an "ls". in a directory listing. Note that its name does not matter, and you can create it wherever you like or use an existing directory. This directory will be visible from the container. I then created pulled the FermiBottle image from Docker and started it.
Code Block | ||
---|---|---|
| ||
(base) user@host % mkdir fermi_summer_school (base) user@host % cd fermi_summer_school (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 % 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 launched ds9 to make sure X-windows are working. Quit it (assuming it works) and change to the shared directory, which is under '/data/' in the container.
Code Block | ||
---|---|---|
| ||
(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 this file, Quick_Test.zip, and put it in the shared directory. Then, unzip it which will create a directory.
...
You can paste one of the http URLs 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 bar. It runs one of the Fermitools (gtbin) and then creates a lightcurve. You should then end up with a notebook that looks like this:
...