-
Notifications
You must be signed in to change notification settings - Fork 0
/
pv.def
61 lines (47 loc) · 1.3 KB
/
pv.def
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Bootstrap: docker
From: kitware/paraviewweb:pv-v5.6.0
%labels
AUTHOR christophe.trophime@lncmi.cnrs.fr
Maintainer: Christophe Trophime
Maintainer_email: christophe.trophime@lncmi.cnrs.fr
Version 1.0
%help
To start:
singularity instance start --nv -B data_dir:/data pv.simg wdemo
To stop:
singularity instance stop wdemo
To login into the running instance:
singularity shell instance://wdemo
Note that it requires a nvidia graphic card to work
%setup
echo "Looking in directory '$SINGULARITY_ROOTFS' for /bin/sh"
if [ ! -x "$SINGULARITY_ROOTFS/bin/sh" ]; then
echo "Hrmm, this container does not have /bin/sh installed..."
exit 1
fi
mkdir -p $SINGULARITY_ROOTFS/data
mkdir -p $SINGULARITY_ROOTFS/usr/local/bin
exit 0
%environment
export LANG=C
PORT=8080
ALLOW_HTTP=true
URL=localhost
export PORT ALLOW_HTTP URL
%post
pwd
cat > /usr/local/bin/start.sh << EOF
#! /bin/bash
/opt/paraview/install/bin/pvpython \
/opt/paraview/install/share/paraview-5.6/web/visualizer/server/pvw-visualizer.py \
--content /opt/paraview/install/share/paraview-5.6/web/visualizer/www \
--port 8080 \
--data /data \
--viewport-max-width 1920 \
--viewport-max-height 1080 \
--timeout 30
EOF
chmod ugo+x /usr/local/bin/start.sh
%startscript
#export EXTRA_PVPYTHON_ARGS="-dr --mesa-swr"
nohup /usr/local/bin/start.sh &