Skip to content

Commit

Permalink
Deploying to gh-pages from @ ec27989 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrilleBonamy committed Feb 20, 2024
1 parent 054d1d6 commit d79d194
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion howtodocker.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ <h3>Contents</h3>
</ul>
</nav>
<p>Here is a How To about using the sedFoam docker.</p><p>The prerequisites is to install Docker : <a href="https://docs.docker.com/engine/install/">https:/<wbr />/<wbr />docs.docker.com/<wbr />engine/<wbr />install/<wbr /></a></p><p>This page is organised in two sections:</p><ul><li><a href="howtodocker.html#configuration" class="m-doc">Configuration of the sedFoam docker</a></li><li><a href="howtodocker.html#howtouse" class="m-doc">How to use/launch sedFoam docker ?</a></li></ul><section id="configuration"><h2><a href="#configuration">Configuration of the sedFoam docker</a></h2><p>Operating System : Ubuntu focal</p><p>Openfoam version : 2212 (openfoam.com) with all tutorials and source files</p><p>sedFoam version : the latest of the develop branch</p><p>user : sudofoam (with sudo)</p><p>Installed packages : swak4foam, python3-numpy, python3-matplotlib, fluidfoam, vim...</p><p>Official link : <a href="https://hub.docker.com/r/cbonamy/sedfoam_2212_ubuntu">https://hub.docker.com/r/cbonamy/sedfoam_<wbr />2212_<wbr />ubuntu</a></p><p>Dockerfile : <a href="https://github.com/SedFoam/sedfoam/blob/develop/docker/Dockerfile">https:/<wbr />/<wbr />github.com/<wbr />SedFoam/<wbr />sedfoam/<wbr />blob/<wbr />develop/<wbr />docker/<wbr />Dockerfile</a></p><p>Extended docker (supporting notebook) : <a href="https://hub.docker.com/r/cbonamy/sedfoam_2212_notebook">https://hub.docker.com/r/cbonamy/sedfoam_<wbr />2212_<wbr />notebook</a></p><p>Please note that Paraview is not included in the sedFoam docker. The users are encouraged to install and use Paraview on the host machine.</p></section><section id="howtouse"><h2><a href="#howtouse">How to use/launch sedFoam docker ?</a></h2><section id="launch"><h3><a href="#launch">launch/initiate docker:</a></h3><ul><li><a href="howtodocker.html#notebook" class="m-doc">In jupyter notebook using your web browser (macOS, linux, windows):</a></li><li><a href="howtodocker.html#macOS" class="m-doc">On macOS with GUI (graphical interface without paraview):</a></li><li><a href="howtodocker.html#windows" class="m-doc">On Windows with GUI (graphical interface without paraview):</a></li><li><a href="howtodocker.html#linux" class="m-doc">On linux with GUI (graphical interface without paraview):</a></li></ul><section id="notebook"><h4><a href="#notebook">In jupyter notebook using your web browser (macOS, linux, windows):</a></h4><p>On host :</p><ul><li><p>initiate docker :</p><pre> docker run -p 8888:8888 --name &quot;sedfoam_2212_notebook&quot; -v=&quot;/Users/toto&quot;:/home/sudofoam/workingDir &quot;cbonamy/sedfoam_2212_notebook&quot;
</pre></li><li>use your web browser :<ul><li>The previous command will give you a url like <a href="http://127.0.0.1:8888/?token=ae5f299fc77312f079793a9ca818d5973ed4df5a5a85b9fa">http:/<wbr />/<wbr />127.0.0.1:8888/<wbr />?token=ae5f299fc77312f079793a9ca818d5973ed4df5a5a85b9fa</a></li><li>Just copy and paste the link into your web browser</li></ul></li></ul><p>The -v=&quot;/Users/toto&quot;:/home/sudofoam/workingDir option is not mmandatory. It is used to mmount a shared space between host and jupyter notebook. If you use this option, please adapt the directories to your configuration. In this example, &quot;/Users/toto&quot; will be mounted on the vm in /home/sudofoam/workingDir.</p></section><section id="macOS"><h4><a href="#macOS">On macOS with GUI (graphical interface without paraview):</a></h4><p>On host :</p><ul><li>configure xquartz<ul><li>install xquartz to allow network connection</li><li>in Xquartz : Go to Preferences &gt; Security</li><li>and Check &quot;allow connections from network clients&quot;</li><li><p>in a terminal :</p><pre> IP=$(ifconfig en0 | grep inet | awk &#x27;$1==&quot;inet&quot; {print $2}&#x27;)
</pre></li><li>use your web browser :<ul><li>The previous command will give you a url like <a href="http://127.0.0.1:8888/?token=ae5f299fc77312f079793a9ca818d5973ed4df5a5a85b9fa">http:/<wbr />/<wbr />127.0.0.1:8888/<wbr />?token=ae5f299fc77312f079793a9ca818d5973ed4df5a5a85b9fa</a></li><li>Just copy and paste the link into your web browser</li></ul></li></ul><p>The -v=&quot;/Users/toto&quot;:/home/sudofoam/workingDir option is not mandatory. It is used to mount a shared space between host and jupyter notebook. If you use this option, please adapt the directories to your configuration. In this example, &quot;/Users/toto&quot; will be mounted on the vm in /home/sudofoam/workingDir.</p></section><section id="macOS"><h4><a href="#macOS">On macOS with GUI (graphical interface without paraview):</a></h4><p>On host :</p><ul><li>configure xquartz<ul><li>install xquartz to allow network connection</li><li>in Xquartz : Go to Preferences &gt; Security</li><li>and Check &quot;allow connections from network clients&quot;</li><li><p>in a terminal :</p><pre> IP=$(ifconfig en0 | grep inet | awk &#x27;$1==&quot;inet&quot; {print $2}&#x27;)
xhost + $IP
</pre></li></ul></li><li><p>initiate docker :</p><pre> docker run -it --net=host -e DISPLAY=$IP:0 -v /tmp/.X11-unix:/tmp/.X11-unix --name &quot;sedfoam_2212&quot; --workdir=&quot;/home/sudofoam&quot; -v=&quot;/Users/toto&quot;:/home/sudofoam/workingDir &quot;cbonamy/sedfoam_2212_ubuntu&quot; /bin/bash
</pre><p>Please adapt the directories to your configuration. In this example, &quot;/Users/toto&quot; will be mounted on the vm in /home/sudofoam/workingDir. If you change IP, for example when returning from work to home, change the Display variable (in the Docker) accordingly.</p></li></ul></section><section id="windows"><h4><a href="#windows">On Windows with GUI (graphical interface without paraview):</a></h4><ul><li>configure Docker Engine for windows (with all system requirements : WSL2, step 1-5 from <a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10">https:/<wbr />/<wbr />docs.microsoft.com/<wbr />en-us/<wbr />windows/<wbr />wsl/<wbr />install-win10</a>)</li><li>configure vcxsrv : <a href="https://sourceforge.net/projects/vcxsrv/">https:/<wbr />/<wbr />sourceforge.net/<wbr />projects/<wbr />vcxsrv/<wbr /></a> (disable access control in extra settings)</li><li><p>Get your IP and set DISPLAY variable :</p><pre> set-variable -name DISPLAY -value YOUR-IP:0.0
Expand Down

0 comments on commit d79d194

Please sign in to comment.