gopaw exists under gbarrand/gopaw on:

docker pull

To get an image, for example on a Mac:

     macOS> docker login  # to login on
     macOS> docker pull gbarrand/gopaw:<version>

On some platforms, you may have to "sudo" the upper commands.

Setup X11 and run on macOS before Mojave

As it is a X11 app, you have to setup the DISPLAY. On a Mac with XQuartz:

     macOS> ifconfig  # to get your IP address.
        sh> DISPLAY=<IP>:0;export DISPLAY
     ( csh> setenv DISPLAY <IP>:0 )
     macOS> xhost + <IP>
     macOS> docker run -e DISPLAY=${DISPLAY} -v /tmp/.X11-unix:/tmp/.X11-unix:rw -t -i gbarrand/gopaw:<version> 

Note the options "-t -i" that permit to redirect the standard input/output on your host terminal.

Setup X11 and run on macOS with Mojave

The upper does not work on Mojave, but the below ansatz, found on stackerflow, works for us :

    mojave> <open a new terminal>
    movaje> <install socat. We installed it with Macports by doing "sudo port install socat">
    movaje> <be sure that the socat app is in your path>

Check that the port 6000 is not used with :

    mojave> lsof -i TCP:6000

then do :

   socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\" &

then another "lsof -i TCP:6000" should give something as :

   socat   23420 barrand    5u  IPv4 0x4e5bb941508d0a39      0t0  TCP *:6000 (LISTEN)

and then, the following command works for us :

   docker run -e -v /tmp/.X11-unix:/tmp/.X11-unix:rw -t -i gbarrand/gopaw:<version>

Setup X11 and run on Windows

On a Windows-10 with the X11/Xming server, from XLaunch, start Xming with "on" in the "No Access Control" box, or from the DOS prompt :

    DOS> Xming :0 -multiwindow -clipboard -ac
 (you may have to kill Xming from "Task manager"), and :
    DOS> docker run -e DISPLAY= -t -i gbarrand/gopaw:<version>

Running some examples

In the container, gopaw is installed under /app/gopaw/<version>/[bin,res]. You can execute some examples with something as:

    GOPAW> lcd /app/gopaw/<version>/res/gopaw/examples/py_root
    GOPAW> exec pawex10

If producing a file, for example here, whilst the container is still running, you can get it on your host with:

     host> docker ps  # to get the container id.
     host> docker cp <container id>:/app/gopaw/<version>/res/gopaw/examples/py_root/ .

You can check that g4tools/HDF5, FITS and CERN-ROOT file reading works with :

    GOPAW> lcd /app/gopaw/<version>/res/gopaw/examples/gopaw
    GOPAW> exec B4      | read the data_B4.hdf5 file.
    GOPAW> exec sdss    | read the data_fpC-005820-g1-0024.fits file.
    GOPAW> exec hst     | read the data_hst-img-2010x1890.fits file.
    GOPAW> exec m51     | read the data_m51.fits file.
    GOPAW> exec pawdemo | read the data_pawdemo.root file.

Mount a local host directory

To work with a local host directory, for example /tmp/work_dir on a Mac :

     mkdir -p /tmp/work_dir
     cd /tmp/work_dir

have here a my.kumac file with in it :

     vector/create VECT1(10)
     vector/input VECT1 10 8 6 4 2 3 5 7 9 11
     v/draw vect1
     /picture/print out.png

Then launch docker/gopaw by mounting /tmp/work_dir on /work_dir by adding in the upper docker run command :

     -v /tmp/work_dir:/work_dir:rw

From gopaw, have :

     GOPAW> lcd /work_dir
     GOPAW> lls
     GOPAW> exec my_kumac
     GOPAW> exit

You should have in the local host /tmp/work_dir a out.png file.