Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

Using the Fermibottle container

Alex Reustle edited this page Jun 20, 2018 · 9 revisions

Using the container

  1. A long string of numbers and letters should be printed to your screen from the create command. This is your CONTAINER ID. You can use this directly. Also you can use the container NAME docker assigned. Look it up with docker ps -a
  2. Start and enter the container with docker start CONTAINER_ID_OR_NAME. Be sure to replace CONTAINER_ID_OR_NAME with your container's ID or its Name.
  3. Attach to the running container with docker attach CONTAINER_ID_OR_NAME.
  4. Welcome to FermiBottle! You can exit the container and shut it down by typing exit into the container's terminal. Or you can leave the container running in the background with Ctrl-p + Ctrl-q.
  5. If you shut down a container, return to it with docker start CONTAINER_ID_OR_NAME && docker attach CONTAINER_ID_OR_NAME.
  6. If a container is already running, reattach to a it (get into the command line) with docker attach CONTAINER_ID_OR_NAME.
  7. The shared directory is in the container at /data.
  8. Launch a second shell with docker exec -it CONTAINER_ID_OR_NAME su - fermi. Be sure it's running first!

The Shared Directory

Sharing files between your host machine and the docker container is handled by a shared directory. Any files in the shared directory are shared between both the host machine and the container. Both can read, write and change files found there.

The shared directory is created for you automatically when you run the docker create ... command described in the installation instructions. On your host the shared directory is the directory you were in when you ran docker create. On the container the shared directory is available in /data.

If you do all of your work in the container from within /data that work will automatically be saved and available on the host machine.

While the contents of the shared directory are visible in the container, the path of the shared directory is not. For example, if your the host machine has shared the /Users/EnricoFermi/work directory with the container, the contents of /Users/EnricoFermi/work will appear in /data within the container. But the full path /Users/EnricoFermi/work will not exist exist within the container.

Jupyter Notebooks

Linux & Mac

Run a jupyter notebook from within the container with notebook. That command is an alias provided for you. It is equivalent to jupyter notebook --ip 00.00.00.00 --no-browser.

You cannot have more than one jupyter notebook running at a time in FermiBottle by default. Forward more ports during the create step if you want to run more notebooks.

Windows

If you can't access the Jupyter notebook via the token generated by the NotebookApp, open a Windows Powershell terminal and run ipconfig. Change the IP address in front of port 8888 in the token string (should be 0.0.0.0) to the address listed by ipconfig under the heading Ethernet adapter vEthernet (DockerNAT). Reload the page and the Notebook should appear.