Giter Site home page Giter Site logo

docker's Introduction

Docker 4 Feel++

Feel++ Env

What can you generate with this repository ?

Using docker and docker-compose, you will currently generate the following images:

  • feelpp/feelpp-env:latest

In-situ visulization with ParaView

In a nutshell

# This setup is valid if you are launching ParaView 
# and docker on the same computer.
# You must ensure that your ParaView version matches the one used in docker
# (It should be the latest available)

# Download Feel++ docker image
shell> docker pull feelpp/develop

From here, you have 2 ways to proceed:

  • Directly use the network of the host:
# Launch a pvserver
shell> pvserver
# Launch ParaView, connect to the pvserver and enable Catalyst in the interface 
shell> paraview

# Run the feelpp image
shell> docker run -ti --net=host feelpp/develop

# Run the application
dockershell> mpirun -np 2 feelpp_qs_laplacian_2d --config-file src/feelpp/quickstart/laplacian/qs_laplacian_2d.cfg --exporter.format vtk --exporter.vtk.insitu.enable 1
  • Use the port export feature from docker (safer regarding to security):
# Run feelpp image
shell> docker run -ti -P 11111:11111 feelpp/develop

# Launch tmux to multiplex terminals
dockershell> tmux
# Launch a pvserver in the first terminal
dockershell1> pvserver

# Launch ParaView and connect to the pvserver
shell> paraview

dockershell2> mpirun -np 2 feelpp_qs_laplacian_2d --config-file src/feelpp/quickstart/laplacian/qs_laplacian_2d.cfg --exporter.format vtk --exporter.vtk.insitu.enable 1

Full description

The dev-env image builds the latest stable version of ParaView with Catalyst enabled for In-Situ visualization. The develop image uses the dev-env base image and enables In-Situ visualization.

To use In-Situ visulization with a Feel++ application that you build in a container based on the develop image, you first have to configure the container to export ports.
The first time you launch the container with docker run, you must use the -p option to redirect a container port to the host machine. The option syntax is as follows in the simple case: -p hostPost:containerPort. In this case, you will redirect the containerPort port to the hostPort port.
We advise you to use a pvserver to use In-Situ. The default port pvserver uses is 11111, thus to export this port when running the container, you can do:

docker run -ti -p 11111:11111  feelpp/develop

Useful tip: the feelpp/dev-env image packages the tmuxand screen terminal multiplexers, so you can launch several virtual terminals inside the container.

Once you have launcher the container with the exported port, you can launch a pvserver inside the connect and setup your ParaView to use Catalyst and connect to the pvserver, by specifying the host and hostPort. You can then launch sample Feel++ apps and use In-Situ visualization. For example:

mpirun -np 2 feelpp_qs_laplacian_2d --config-file src/feelpp/quickstart/laplacian/qs_laplacian_2d.cfg --exporter.format vtk --exporter.vtk.insitu.enable 1

If you encounter problems regarding infiniband on supercomputers, you can add the following option to mpirun to use tcp: -mca btl tcp,self

For more information about In-Situ visualization in Feel++, please refer to https://github.com/feelpp/feelpp/wiki/In-Situ-Visualization

docker's People

Contributors

aancel avatar gdolle avatar prudhomm avatar trophime avatar vincentchabannes avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker's Issues

v.105 alpha tag incorrect

The dockerhub tag for the version 105 alpha currently does not respect the tag naming convention due to a typo. This breaks singularity pipeline latest tag conversion.

Current:
develop-v0.105.0alpha.1-ubuntu-16.04

Should be:
develop-v0.105.0-alpha.1-ubuntu-16.04

up to boost 1.67

update support to 1.67, it is the latest supported boost libs version by feel++

add Qt6 support

Qt6 support is needed for some of our applications.
it will be available in the latest ubuntu LTS

install packages

Is it possible to have make and rsync installed in the images ?
for example in feelpp/feelpp-toolboxes:latest they are not installed.

feelpp packages missing from bullseye docker image

@prudhomm In latest build for Bullseye image see [log](https://github.com/feelpp/docker/actions/runs/3407906262/jobs/5667985049
there are no feelpp package:)

#9 5.936 E: Failed to fetch http://apt.feelpp.org//bullseye/dists/bullseye/InRelease  403  Forbidden [IP: 52.95.156.84 80]
#9 5.936 E: The repository 'http://apt.feelpp.org//bullseye bullseye InRelease' is not signed.
#9 5.948 Reading package lists...
#9 6.370 Building dependency tree...
#9 6.464 Reading state information...
#9 6.568 E: Unable to locate package feelpp-*
#9 6.568 E: Couldn't find any package by glob 'feelpp-*'
#9 6.568 E: Couldn't find any package by regex 'feelpp-*'
#9 6.568 E: Unable to locate package libfeelpp1
#9 6.568 E: Unable to locate package python3-feelpp*
#9 6.568 E: Couldn't find any package by glob 'python3-feelpp*'
#9 6.568 E: Couldn't find any package by regex 'python3-feelpp*'
#9 DONE 6.6s

This is due to a missing FLAVOR var in the github action matrix.
see https://github.com/feelpp/docker/actions/runs/3407906262/jobs/5667985049#step:6:109

Same also apply to sid image.
But not with testing
see https://github.com/feelpp/docker/actions/runs/3407654948/jobs/5667688575#step:6:109

Issue with OpenMPI in docker

when @vincentchabannes run executables in docker, all work well but he has a lot of messages like:

Read -1, expected <someNumber>, errno =1

see open-mpi/ompi#4948 for more details.
it solves the problem.

  • Solution 1: add an mca parameter to mpiexec launches:
mpiexec -n 4 --mca btl ^vader feelpp_qs_laplacian_2d --checker.solution x**2+y**2 --ksp-monitor=1 --pc-type lu
  • Solution 2: just export OMPI_MCA_btl_vader_single_copy_mechanism=none

Maybe we could add the env variable in feelpp-env?

Remove sources from docker images

Unless I'm working with old images, it seems that the docker images are
still containing srcs. The srcs would eventually be "required" if we were compiling
with Debug/RelWithDebugInfo flag otherwise they are not needed.

Could we really remove feelpp from /home/feelpp/src after a successful build?
In the case of feelpp-toolboxes we could save up to 380 MB...

Cannot import feelpp python module

With one of the latest feelpp-toolboxes docker image,
I run into this pb:

docker run -it --rm ghcr.io/feelpp/feelpp-toolboxes:develop-v0.110.0-alpha.3-ubuntu-20.04 
Starting with UID : 9001

The Feel++ testcases have been copied on the host system in
/feelppdb/testcases
ls /feelppdb/testcases
toolboxes
You can use and edit them as you which either within docker or on your system

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

user@42c2e86ac201:~$ python3
Python 3.8.10 (default, Nov 26 2021, 20:14:08) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import feelpp
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'feelpp'
>>> 

To fix this, you have to define PYTHONPATH:

user@42c2e86ac201:$ export PYTHONPATH=/usr/local/lib/python3/dist-packages/
user@42c2e86ac201:
$ python3
Python 3.8.10 (default, Nov 26 2021, 20:14:08)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import feelpp

It may be better to set PYTHONPATH to: /usr/local/lib/python3/:/usr/local/lib/python3/dist-packages/ as there are some nlopt bindings also shipped within the docker image.

NB:

  • why don't you use python3-nlopt package from debian/ubuntu archive?
  • why keeping python2 stuff ?
  • if you ever remove python2, please consider adding python-is-python3 package

Install Git-LFS in docker feelpp/feelpp-env

git lfs is not installed in the docker image.
I see that because the mesh feelpp/toolboxes/thermoelectric/ElectroMagnets/HL-31_H1/HL-31_H1-coarse.msh is not downloaded (not present in docker image) and thus this example doesn't work.

Maybe, we move soon this mesh in girder (when url download will be available in Feel).
Hower it maybe usefull to have git lfs in the docker image.

@prudhomm what do you think?

VMTK tools fail in Docker image

@francoisdh commented on Wed May 02 2018

Using the feelpp/angiotk:stable Docker image, VMTK tools fail:

user@feelpp:~$ vmtkimagewriter
Unexpected error: <type 'exceptions.ImportError'>
Traceback (most recent call last):
  File "/usr/local/bin/vmtkimagewriter", line 20, in <module>
    from vmtk import pypeserver
ImportError: No module named vmtk

The problem can be fixed by appending the following path to the PYTHONPATH environment
variable:

export PYTHONPATH = $PYTHONPATH:/usr/local/lib/python3.5/site-packages

I guess this could be added to the docker image ?


@francoisdh commented on Wed May 02 2018

feelpp-env needs to be updated


@prudhomm commented on Mon May 07 2018

@francoisdh I added this to the sprint as it is needed to fix the python issue to transform the niftii imageto mha format.
I will redo the feelpp-env to fix that.

Please replace reference to jfrog depot

Hi,
in latest feelpp-toolboxes (same for feelpp-mor image) there is still a reference to jfrog depot
This creates an error when building docker on top of this image.

cannot access '/feelppdb/testcases/': No such file or directory

@prudhomm it seems that there is a missing directory in the toolboxes docker image:

docker run -it --rm ghcr.io/feelpp/feelpp-toolboxes:feature-toolboxes-v0.110.0-alpha.3-ubuntu-20.04 
Starting with UID : 9001
chown: cannot access '/feelppdb/testcases/': No such file or directory
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details

I guess this is not a big issue

Support for FMILib and pyfmi

now that we integrate openmodelica in Feel++ we need to have support for FMILib and pyfmi to communicate properly between the two frameworks.

it requires

  • cython
  • Assimulo
  • sundials
  • lxml
  • python3-tk
  • matplotlib

Update script for singularity 2.4

We need to rework script to work with singularity 2.4.

  • Remove docker size calculation since it's done automatically via new build option.
  • Remove local pull check (Needed before for size calculation)

Please update petsc/slepc in Ubuntu 20.04 images

Now petsc/slepc 3.12 are in main ubuntu 20.04
Could you update the feelpp images?

Maybe it will be a good idea to use pets-dev/slepc-dev package instead of petsc/slepc packages with version numbers?

`start.sh` may force permissions change on mounted directories

Hi,
I'm having some problems with start.sh script.
Imagine that I run feelpp/feelpp-toolboxes with this command line:

docker run -it --rm -v /home/me/data:/home/user/data -e LOCAL_USER_ID=`id -u $USER` ..

Since there is a chmod -R user.user $HOME in start.sh the permissions on /home/me/data will be forced to user.user which shall not append!

update cmake to 3.12

get the latest cmake to prepare for 3.13 which should bring the tools to facilitate debian packaging

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.