https://github.com/martgro/fenics_tests
Messing around with the python simulation environment Fenics
https://github.com/martgro/fenics_tests
Last synced: 5 months ago
JSON representation
Messing around with the python simulation environment Fenics
- Host: GitHub
- URL: https://github.com/martgro/fenics_tests
- Owner: MartGro
- Created: 2019-03-12T16:53:11.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-12T17:20:41.000Z (over 7 years ago)
- Last Synced: 2025-10-10T18:31:46.452Z (9 months ago)
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fenics_Tests
## Command for starting Fenics in docker
docker run -ti -e DISPLAY=$DISPLAY -p 127.0.0.1:8000:8000 -v $(pwd):/home/fenics/shared -v /tmp/.X11-unix:/tmp/.X11-unix quay.io/fenicsproject/stable:latest
The local directory (cwd) is shared to home/fenics/shared by
-v $(pwd):/home/fenics/shared
The graphics access works by:
-e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix (already included above)
In order for this to work, this command has to be executed before the docker command:
xhost +
You can test it by viewing an image in the command line, the programm "feh" works perfectly for this task.
install it by typing
sudo apt update
sudo apt install feh
in the commandline (in the docker-commandline, not your local machine).
Then you can view an image by using:
feh /path/to/image.png
But remember: Firing up docker, you have to enter
xhost +
## Further reading
Interesting resources regarding docker and Fenics:
https://bitbucket.org/fenics-project/docker
https://fenics.readthedocs.io/projects/containers/en/latest/work_flows.html