diff --git a/docs/source/devguide/docker.rst b/docs/source/devguide/docker.rst new file mode 100644 index 0000000000..12c095c455 --- /dev/null +++ b/docs/source/devguide/docker.rst @@ -0,0 +1,57 @@ +.. _devguide_docker: + +====================== +Deployment with Docker +====================== + +OpenMC can be easily deployed using `Docker `_ on any +Windows, Mac or Linux system. With Docker running, execute the following +command in the shell to build a `Docker image`_ called ``debian/openmc:latest``: + +.. code-block:: sh + + docker build -t debian/openmc:latest https://github.com/openmc-dev/openmc.git#develop + +.. note:: This may take 5 -- 10 minutes to run to completion. + +This command will execute the instructions in OpenMC's ``Dockerfile`` to +build a Docker image with OpenMC installed. The image includes OpenMC with +MPICH and parallel HDF5 in the ``/opt/openmc`` directory, and +`Miniconda3 `_ with all of the Python +pre-requisites (NumPy, SciPy, Pandas, etc.) installed. The +`NJOY2016 `_ codebase is installed in +``/opt/NJOY2016`` to support full functionality and testing of the +``openmc.data`` Python module. The publicly available nuclear data libraries +necessary to run OpenMC's test suite -- including NNDC and WMP cross sections +and ENDF data -- are in the ``/opt/openmc/data directory``, and the +corresponding :envvar:`OPENMC_CROSS_SECTIONS`, +:envvar:`OPENMC_MULTIPOLE_LIBRARY`, and :envvar:`OPENMC_ENDF_DATA` +environment variables are initialized. + +After building the Docker image, you can run the following to see the names of +all images on your machine, including ``debian/openmc:latest``: + +.. code-block:: sh + + docker image ls + +Now you can run the following to create a `Docker container`_ called +``my_openmc`` based on the ``debian/openmc:latest`` image: + +.. code-block:: sh + + docker run -it --name=my_openmc debian/openmc:latest + +This command will open an interactive shell running from within the +Docker container where you have access to use OpenMC. + +.. note:: The ``docker run`` command supports many + `options `_ + for spawning containers -- including `mounting volumes`_ from the + host filesystem -- which many users will find useful. + +.. _Docker image: https://docs.docker.com/engine/reference/commandline/images/ +.. _Docker container: https://www.docker.com/resources/what-container +.. _options: https://docs.docker.com/engine/reference/commandline/run/ +.. _mounting volumes: https://docs.docker.com/storage/volumes/ + diff --git a/docs/source/devguide/index.rst b/docs/source/devguide/index.rst index e2410f080d..d100fdcdfd 100644 --- a/docs/source/devguide/index.rst +++ b/docs/source/devguide/index.rst @@ -18,3 +18,4 @@ other related topics. tests user-input docbuild + docker diff --git a/docs/source/quickinstall.rst b/docs/source/quickinstall.rst index f172accb34..33f99e0a92 100644 --- a/docs/source/quickinstall.rst +++ b/docs/source/quickinstall.rst @@ -59,37 +59,18 @@ are no longer supported. .. _APT package manager: https://help.ubuntu.com/community/AptGet/Howto ------------------------------------------- -Installing with Docker on Linux/Mac/Windows +Installing on Linux/Mac/Windows with Docker ------------------------------------------- OpenMC can be easily deployed using `Docker `_ on any Windows, Mac or Linux system. With Docker running, execute the following -command in the shell to build a `Docker image`_ called ``debian/openmc:latest``: +command in the shell to download and run a `Docker image`_ with the most recent release of OpenMC from `DockerHub `_ called ``openmc/openmc:latest``: .. code-block:: sh - docker build -t debian/openmc:latest https://github.com/openmc-dev/openmc.git#develop + docker run openmc/openmc:latest -.. note:: This may take 5 -- 10 minutes to run to completion. - -This command will execute the instructions in OpenMC's ``Dockerfile`` to -build a Docker image with OpenMC installed to ``/opt/openmc``. After building -the Docker image, you can run the following to see the names of all images -on your machine, including ``debian/openmc:latest``: - -.. code-block:: sh - - docker image ls - -Now you can run the following to create a `Docker container`_ called -``my_openmc`` based on the ``debian/openmc:latest`` image: - -.. code-block:: sh - - docker run -it --name=my_openmc debian/openmc:latest - -This command will open an interactive shell running from within the -Docker container where you have access to use OpenMC. +This will take 5 -- 10 minutes to run to completion depending on your internet download speed. The command will place you in an interactive shell running in a `Docker container`_ with OpenMC installed. .. note:: The ``docker run`` command supports many `options `_ diff --git a/docs/source/usersguide/install.rst b/docs/source/usersguide/install.rst index 17810d23cb..48dcd8c782 100644 --- a/docs/source/usersguide/install.rst +++ b/docs/source/usersguide/install.rst @@ -71,63 +71,6 @@ are no longer supported. .. _Personal Package Archive: https://launchpad.net/~paulromano/+archive/staging .. _APT package manager: https://help.ubuntu.com/community/AptGet/Howto -.. _install_docker: - -------------------------------------------- -Installing with Docker on Linux/Mac/Windows -------------------------------------------- - -OpenMC can be easily deployed using `Docker `_ on any -Windows, Mac or Linux system. With Docker running, execute the following -command in the shell to build a `Docker image`_ called ``debian/openmc:latest``: - -.. code-block:: sh - - docker build -t debian/openmc:latest https://github.com/openmc-dev/openmc.git#develop - -.. note:: This may take 5 -- 10 minutes to run to completion. - -This command will execute the instructions in OpenMC's ``Dockerfile`` to -build a Docker image with OpenMC installed. The image includes OpenMC with -MPICH and parallel HDF5 in the ``/opt/openmc`` directory, and -`Miniconda3 `_ with all of the Python -pre-requisites (NumPy, SciPy, Pandas, etc.) installed. The -`NJOY2016 `_ codebase is installed in -``/opt/NJOY2016`` to support full functionality and testing of the -``openmc.data`` Python module. The publicly available nuclear data libraries -necessary to run OpenMC's test suite -- including NNDC and WMP cross sections -and ENDF data -- are in the ``/opt/openmc/data directory``, and the -corresponding :envvar:`OPENMC_CROSS_SECTIONS`, -:envvar:`OPENMC_MULTIPOLE_LIBRARY`, and :envvar:`OPENMC_ENDF_DATA` -environment variables are initialized. - -After building the Docker image, you can run the following to see the names of -all images on your machine, including ``debian/openmc:latest``: - -.. code-block:: sh - - docker image ls - -Now you can run the following to create a `Docker container`_ called -``my_openmc`` based on the ``debian/openmc:latest`` image: - -.. code-block:: sh - - docker run -it --name=my_openmc debian/openmc:latest - -This command will open an interactive shell running from within the -Docker container where you have access to use OpenMC. - -.. note:: The ``docker run`` command supports many - `options `_ - for spawning containers -- including `mounting volumes`_ from the - host filesystem -- which many users will find useful. - -.. _Docker image: https://docs.docker.com/engine/reference/commandline/images/ -.. _Docker container: https://www.docker.com/resources/what-container -.. _options: https://docs.docker.com/engine/reference/commandline/run/ -.. _mounting volumes: https://docs.docker.com/storage/volumes/ - .. _install_source: ----------------------