Skip to content

pyiron/docker-stacks

 
 

Docker Stacks

Docker Testing Binder

Here, you find the necessary files for building various pyiron docker images. All of these images can be pulled from docker-hub. We provide following flavors based on the main pyiron modules:

Image Name Derived From Additional Dependencies Pull Command
pyiron/base jupyter/base-notebook pyiron_base docker pull pyiron/base
pyiron/md pyiron/base LAMMPS, pyiron, NGLview docker pull pyiron/md
pyiron/pyiron pyiron/md SPHInX, GPAW docker pull pyiron/pyiron
pyiron/experimental pyiron/base TEMMETA, pyprismatic, match-series, pyxem, pystem docker pull pyiron/experimental
pyiron/continuum pyiron/md damask, sqsgenerator, fenics docker pull pyiron/continuum
pyiron/potentialworkshop pyiron/pyiron atomicrex, calphy, pyiron_contrib, pyiron_gpl, python-ace, runner docker pull pyiron/potentialworkshop
pyiron/mpie_cmti pyiron/pyiron atomicrex, calphy, fitsnap, pyiron_contrib, pyiron_gpl, pyiron_gui, pyiron_workflow, python-ace, pytorch, runner, tensorflow docker pull pyiron/mpie_cmti

By deriving the images from each other the size of Docker layers is reduced to a minimum. The images also include some example notebooks to get you started.

Execute Docker Container

Running one of these container and spawning a Jupyter server from within will provide you with a ready-to-start environment for using pyiron. If you like a simple Jupyter notebook, run

docker run -i -t -p 8888:8888 <image name> /bin/bash -c "source /opt/conda/bin/activate; jupyter notebook --notebook-dir=/home/jovyan/ --ip='*' --port=8888"

replace <image_name> with respective image you want to use, e.g. pyiron/md. If you prefer to use Jupyter lab, run

docker run -i -t -p 8888:8888 <image_name> /bin/bash -c "source /opt/conda/bin/activate; jupyter lab --notebook-dir=/home/jovyan/ --ip='*' --port=8888"

These commands do a number of things:

  • docker run <image_name> spawns a container based on image <image_name>. In case the image isn't already on your system, it will be downloaded. Also, if not further specified, the latest tag will be assumed and outdated local versions may be updated.
  • -i -t: the container is spanwed in "interactive mode" by allocating a pseudo-tty (-t).
  • -p 8888:8888: port 8888 of the container instance is forwarded to port 8888 of the host.
  • <image name>: the image's name.
  • /bin/bash: inside the container, a bash shell is started.
  • -c "source /opt/conda/bin/activate; jupyter notebook --notebook-dir=/home/jovyan/ --ip='*' --port=8888": the shell executes the command inside the quotation marks:
    • source /opt/conda/bin/activate: activate the conda environment
    • jupyter notebook or jupyter lab: start a Jupyter server running a notebbok/lab. Do this in the user's (jovyan) home-directory (--notebook-dir=/home/jovyan/) and allow connections from any IP address (--ip='*') on port 8888 (--port=8888) which is connected to the outside.

Data Persistence

In case you want to keep data you worked on/created while using the container, it may be convenient to mount a local directory into the home directory of the docker container by adding -v <local_path>:/home/jovyan/ to the docker run command:

docker run -i -t  -v <local_path>:/home/jovyan/ -p 8888:8888 <image_name> /bin/bash -c "source /opt/conda/bin/activate; jupyter notebook --notebook-dir=/home/jovyan/ --ip='*' --port=8888"

About

Ready-to-run Docker images containing pyiron applications

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 49.2%
  • Python 31.1%
  • Shell 19.7%