mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
migrate docker information from website to wiki
1
home.md
1
home.md
@ -41,6 +41,7 @@ select Linux systems:
|
||||
| [Debian/Ubuntu](/precompiled/debian) |
|
||||
| [openSUSE](/precompiled/suse) |
|
||||
| [CentOS/RedHat/Fedora](/precompiled/redhat) |
|
||||
| [Docker](/precompiled/docker) |
|
||||
|
||||
|
||||
## [](#coding) Coding
|
||||
|
||||
3
icons/archlinux.svg
Normal file
3
icons/archlinux.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg role="img"
|
||||
width="48" height="48"
|
||||
viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Arch Linux icon</title><path d="M11.390232.60509C10.375655 3.09168 9.764285 4.7185 8.63513 7.13162c.692712.734695 1.542857 1.589214 2.923032 2.553937-1.484256-.610496-2.49621-1.223615-3.25277-1.859475-1.444897 3.015743-3.710204 7.311953-8.30554 15.568513 3.612246-2.08513 6.411955-3.36997 9.020993-3.861516-.111954-.48105-.175802-1.003208-.17143-1.54723l.0035-.115453c.057725-2.314286 1.261224-4.09417 2.68688-3.972595 1.425656.119825 2.53382 2.095627 2.477843 4.409038-.010496.43557-.06035.85452-.146064 1.242857 2.58105.504665 5.351895 1.78688 8.914286 3.844024-.702333-1.29271-1.329447-2.4586-1.928572-3.569387-.943732-.731196-1.926822-1.6828-3.933236-2.71312 1.3793.3586 2.366764.77143 3.136443 1.23411C13.970407 7.010922 13.478862 5.503924 11.390232.60509zM22.897813 21.360193v-.623615h-.233528v-.083965h.561516v.083965h-.2344v.623615h-.093587M23.322886 21.360193v-.70758h.14169l.167056.501166c.015744.04723.027114.082215.03411.10583.007873-.025365.020118-.06385.038485-.113703l.168805-.493294h.126822v.70758h-.090962v-.593003l-.206414.593003h-.083965l-.204665-.602624v.602623h-.090962"/></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
3
icons/docker.svg
Normal file
3
icons/docker.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg role="img"
|
||||
width="48" height="48"
|
||||
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>Docker icon</title><path d="M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288Z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
@ -15,6 +15,7 @@ the following:
|
||||
| [Debian/Ubuntu](/precompiled/debian) |
|
||||
| [openSUSE](/precompiled/suse) |
|
||||
| [CentOS/RedHat/Fedora](/precompiled/redhat) |
|
||||
| [Docker](/precompiled/docker) |
|
||||
|
||||
Debian/Ubuntu and openSUSE generally receive first attention:
|
||||
|
||||
|
||||
148
precompiled/docker.md
Normal file
148
precompiled/docker.md
Normal file
@ -0,0 +1,148 @@
|
||||
<!-- --- title: Precompiled Packages (docker) -->
|
||||
|
||||
[](/home)
|
||||
[](/precompiled)
|
||||
|
||||
[[_TOC_]]
|
||||
|
||||

|
||||
|
||||
## Precompiled packages - Docker
|
||||
|
||||
OpenCFD Ltd. uses [Docker Hub](https://hub.docker.com/) to distribute
|
||||
pre-compiled versions of OpenFOAM for Linux, Mac OS X and Windows,
|
||||
including a complete development environment.
|
||||
|
||||
Docker containers enable binaries compiled on a given Linux environment to
|
||||
be run on other platforms without any performance degradation. Docker also
|
||||
operates on Windows and Mac OS X wrapped in a light-weight Virtual Box.
|
||||
|
||||
An image of OpenFOAM contains binaries and source code. The Docker environment provides:
|
||||
- A complete development environment to compile local modifications and create executables.
|
||||
- consistent behaviour of the OpenFOAM across all platforms
|
||||
|
||||
Check if your (Linux or Windows or Mac OS X) system is supported by visiting
|
||||
https://docs.docker.com/engine/installation/
|
||||
|
||||
|
||||
### Installing Docker
|
||||
|
||||
Docker is available in a Community Edition (CE) and an Enterprise Edition
|
||||
(EE). For installing and running the OpenFOAM image, the Community Edition is
|
||||
sufficient.
|
||||
Please see: https://docs.docker.com/engine/installation/
|
||||
|
||||
### Installing and running OpenFOAM
|
||||
|
||||
- Make sure the user is in the _docker_ group.
|
||||
This can be checked with
|
||||
```
|
||||
$ id
|
||||
```
|
||||
The list of groups should include _docker_.
|
||||
- Make sure the Docker daemon is running:
|
||||
```
|
||||
$ docker info
|
||||
```
|
||||
- Download the following scripts from the release instructions and put them
|
||||
in a local directory (_eg_, your home directory)
|
||||
- [installOpenFOAM][install-script]
|
||||
- [startOpenFOAM][start-script]
|
||||
- Make both scripts executable:
|
||||
```
|
||||
$ chmod +x installOpenFOAM
|
||||
$ chmod +x startOpenFOAM
|
||||
```
|
||||
- Download and create the Docker container for OpenFOAM by executing the
|
||||
first script:
|
||||
```
|
||||
$ ./installOpenFOAM
|
||||
```
|
||||
This only needs to be done once per login. The first invocation will
|
||||
download the whole OpenFOAM installation so might take some time to finish.
|
||||
Future invocations will only take a few seconds.
|
||||
- Start the Docker container with the second script:
|
||||
```
|
||||
$ ./startOpenFOAM
|
||||
```
|
||||
- This will open a new shell with the OpenFOAM environment fully installed
|
||||
and ready to use. For example,
|
||||
```
|
||||
mkdir -p $FOAM_RUN
|
||||
run
|
||||
cp -p $FOAM_TUTORIALS/incompressible/icoFoam/cavity/cavity .
|
||||
cd cavity
|
||||
blockMesh
|
||||
icoFoam
|
||||
```
|
||||
- All user files inside the Docker environment are available on the host inside
|
||||
the home directory.
|
||||
|
||||
|
||||
## Frequently Asked Questions about Docker
|
||||
|
||||
- <em>Is there any performance degradation when running via Docker?</em><br/>
|
||||
Docker should run as fast as natively compiled code.
|
||||
On Windows and Mac OS X there may be a slight performance penalty
|
||||
associated with I/O.
|
||||
- <em>How do I check if the OpenFOAM image has been downloaded correctly?</em><br/>
|
||||
Type the command
|
||||
```
|
||||
$ docker images
|
||||
```
|
||||
to show the images available in Docker environment. For example,
|
||||
```
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
openfoamplus/of_v2006_centos73 latest f37ab3b17c2d 2 months ago 2.98GB
|
||||
...
|
||||
```
|
||||
If you receive an error message about not being able to contact the Docker
|
||||
daemon check that:
|
||||
- the Docker daemon is started at boot time
|
||||
- the user account is in the _docker_ group (see output from the `id` command)
|
||||
- <em>Where are my files?</em><br/>
|
||||
The user files inside Docker are visible (_ie_, mounted) in your home area
|
||||
and can be operated on just like any other file.
|
||||
- <em>Why doesn't `paraFoam` display?</em><br/>
|
||||
Make sure that your machine's software is fully up-to-date. See if you can
|
||||
start a simple X-windows, non-graphics program (for example, `xterm`).
|
||||
If this does not come up there may be a problem with the _xhost_ access to
|
||||
the host screen. This is one of the steps inside the _startOpenFOAM_ script.
|
||||
An alternative remedy is to install the native ParaView version for your
|
||||
system, and use the built-in OpenFOAM reader and/or OpenFOAM data
|
||||
conversion tools such as `foamToVTK`.
|
||||
- <em>How do I run parallel?</em><br/>
|
||||
Same as any other OpenFOAM installation, _e.g._: `mpirun -np 2 icoFoam -parallel`
|
||||
- <em>How do I run parallel on multiple computers?</em><br/>
|
||||
This is not trivial inside the Docker environment. Also you might want to
|
||||
include optimised communication libraries (MPI) so it probably makes more
|
||||
sense to [perform a native compilation](/building)
|
||||
- <em>How do I compile code?</em><br/>
|
||||
The Docker environment contains a full OpenFOAM development environment so
|
||||
all `wmake`, `wclean` _etc._ commands work (it is running the actual
|
||||
environment OpenFOAM was compiled in!)
|
||||
- <em>What does installOpenFOAM do?</em><br/>
|
||||
It downloads the OpenFOAM image from the Docker Hub and creates a
|
||||
specialized container. This container
|
||||
- mounts the home directory of the user with read/write access
|
||||
- optionally channels the graphics
|
||||
- sets up the OpenFOAM environment.
|
||||
|
||||
- <em>I still have questions...</em><br/>
|
||||
The Docker route is being continually refined. It you have comments/tips
|
||||
please mail them to: `docker (at) opencfd.co.uk`
|
||||
|
||||
|
||||
## About the image
|
||||
|
||||
The current image was created from CentOS 7.3. If you wish to install any
|
||||
additional tool in your docker container, start it as usual via the
|
||||
_startOpenFOAM_ script, login as root with the password `ofuser2006` for the
|
||||
OpenFOAM-v2006 version and use _e.g._ `yum`.
|
||||
|
||||
|
||||
---
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
|
||||
[install-script]: https://sourceforge.net/projects/openfoam/files/v2006/installOpenFOAM
|
||||
[start-script]: https://sourceforge.net/projects/openfoam/files/v2006/startOpenFOAM
|
||||
Reference in New Issue
Block a user