1

I just started to use FEniCS with Python. I am using Docker and a FEniCS enabled terminal to run the programs. It works well to run programs in this way but I cannot access the figures. According to the terminal: "To view figure, visit http://127.0.0.1:8000", but when I enter "http://127.0.0.1:8000" into Safari it says "Safari can't connect to the server". I have tried different browsers but the problem remains. I am using a Mac computer with MacOS Sierra and a Netgear router. How can I access http://127.0.0.1:8000?

I follow the FEniCS Tutorial vol1 (https://fenicsproject.org/pub/tutorial/pdf/fenics-tutorial-vol1.pdf) to launch docker and run the Python program. This means that I create a FEniCS session (container) by writing:

fenicsproject run

Then I run the Python program by typing for instance:

python ft01_poisson.py

I have also tried to open the port 127.0.0.1:8000 when I start the container by writing

docker run --rm -ti -v 'pwd':/home/fenics/shared 
-w /home/fenics/shared quay.io/fenicsproject/stable:current '/bin/bash -l 
-c "export TERM=xterm;bash -i"' -p 127.0.0.1:8000:8000

However, if I create a container in this way I cannot find the file that I want to run, even if I create the container when I am in the directory where the Python file is located.

Vierni
  • 11
  • 5
  • 1
    [need a mvce](https://stackoverflow.com/help/mcve) like how you are launching docker. BTW [Looks like you need to open the port](https://fenicsproject.org/qa/12311/fenics-2016-2-0-problem-with-pyplot/) – lloyd Mar 13 '18 at 07:28
  • Thanks for your reply. I added some extra information about how I launch a docker and run the program. I looked at the link that you provided about how to open a port but it does not work to type "docker run -it" when I am in a FEniCS session. It says "docker: command not found". – Vierni Mar 13 '18 at 08:01
  • For a background of docker check out their [tutorial](https://docs.docker.com/get-started/) – lloyd Mar 13 '18 at 08:50
  • I skimmed through the tutorial but I could not find anything that helped me. I try to open the port by writing "docker run --rm -ti -v 'pwd':/home/fenics/shared -w /home/fenics/shared quay.io/fenicsproject/stable:current '/bin/bash -l -c "export TERM=xterm;bash -i"' -p 127.0.0.1:8000:8000" but then I cannot find the file ft01_poisson.py. – Vierni Mar 13 '18 at 10:24
  • Could you resolve your problem with the port? I'm experiencing similar issues – jost21 Oct 12 '18 at 14:13

0 Answers0