-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparaviewweb.def
53 lines (40 loc) · 1.74 KB
/
paraviewweb.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
Bootstrap: docker
From: kitware/paraviewweb:pvw-base-osmesa-v5.6.0
%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/tmp/var/log/apache2
mkdir -p $SINGULARITY_ROOTFS/tmp/var/run/apache2
mkdir -p $SINGULARITY_ROOTFS/tmp/var/lock/apache2
cp -r /home/LNCMI-G/trophime/paraviewweb/tools/docker/demo/config $SINGULARITY_ROOTFS/tmp
exit 0
%environment
export LANG=C
PORT=8080
ALLOW_HTTP=true
URL=localhost
export PORT ALLOW_HTTP URL
%post
cp /tmp/config/launcher/launcher-template.json /opt/wslink-launcher/launcher-template.json
/opt/paraviewweb/scripts/addEndpoints.sh glance /opt/paraview/install/share/paraview-5.6/web/glance/www
/opt/paraviewweb/scripts/addEndpoints.sh lite /opt/paraview/install/share/paraview-5.6/web/lite/www
/opt/paraviewweb/scripts/addEndpoints.sh divvy /opt/paraview/install/share/paraview-5.6/web/divvy/www
/opt/paraviewweb/scripts/addEndpoints.sh visualizer /opt/paraview/install/share/paraview-5.6/web/visualizer/www
chmod go+w /opt/wslink-launcher
perl -pi -e "s|/var/log|/tmp/var/log|g" /etc/apache2/sites-enabled/001-pvw.conf
perl -pi -e "s|80|8080|g" /etc/apache2/sites-enabled/001-pvw.conf
# prepare apache2
perl -pi -e "s|/var|/tmp/var|g" /etc/apache2/envvars
chmod o+w /tmp/var/log/apache2
chmod o+w /tmp/var/run/apache2
chmod o+w /tmp/var/lock/apache2
# Change the port we are listening on to 8080 instead of 80
sed -ie "s/^\(Listen\).*/\1 8080/" /etc/apache2/ports.conf
%startscript
echo "Starting Apache webserver"
apache2ctl start > /tmp/apache2ctl.log 2>&1
echo "Starting the wslink launcher"
nohup /opt/paraviewweb/scripts/start.sh > /tmp/paraviewweb.log 2>&1 &