-
Notifications
You must be signed in to change notification settings - Fork 0
/
official-docker.def.in
95 lines (78 loc) · 3 KB
/
official-docker.def.in
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
Bootstrap: docker
From: ubuntu:xenial
#From: DOCKERIMAGE:DOCKERTAG
%runscript
exec echo "The runscript is the containers default runtime command!"
%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
echo "Temporary hack for virtualgl"
mkdir -p $SINGULARITY_ROOTFS/tmp
cp /home/LNCMI-G/trophime/Downloads/virtualgl_2.5.2_amd64.deb $SINGULARITY_ROOTFS/tmp
echo "Temporary hack for Salome"
cp /home/LNCMI-G/trophime/Downloads/Salome-VLVERSION-univ_public.run $SINGULARITY_ROOTFS/tmp
exit 0
%environment
export PATH=/opt/salome/appli_VVERSION/:$PATH
export FEELPP_REPOSITORY=/feel
export DISTENE_LICENSE_FILE=/opt/DISTENE/DLim/dlim8.key
%labels
AUTHOR [email protected]
%post
# create repositories
mkdir -p /scratch /tmp /home /mnt
mkdir -p /opt/DISTENE/DLim
mkdir -p /feel
# # To add Debian/Ubuntu Lncmi repository
# apt-get update && apt-get -y install gnupg2
# gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv 535D3508
# gpg --export --armor 535D3508 | apt-key add -
# echo "deb http://euler/~trophime/debian/ xenial main" > /etc/apt/sources.list.d/lncmi.list
# firefox-esr on Debian
apt-get update
apt-get -y upgrade
apt-get -y install lsb-release \
firefox \
iputils-ping net-tools \
python-simplejson jsonlint \
python-yaml yamllint \
wget curl
# Install Vglrun ( getting deb from sourceforge is broken... )
apt-get -y install libglu1-mesa mesa-utils mesa-utils-extra x11-apps libxv1
if [ ! /tmp/virtualgl_2.5.2_amd64.deb ]; then
wget https://sourceforge.net/projects/virtualgl/files/2.5.2/virtualgl_2.5.2_amd64.deb/download -O /tmp/virtualgl_2.5.2_amd64.deb
fi
dpkg -i /tmp/virtualgl_2.5.2_amd64.deb
# # Work around "ERROR: ld.so: object 'libvglfaker.so' from LD_PRELOAD cannot be preloaded: ignored."
# chmod u+s /usr/lib/libvglfaker.so
# chmod u+s /usr/lib/libdlfaker.so
# apt-get install nvidia-driver nvidia-smi
# Install Salome
apt-get -y install libxss1 libgomp1
if [ ! -f /tmp/Salome-VLVERSION-univ_public.run ]; then
wget --http-user HTTPUSER --http-password HTTPPASSWD \
-O /tmp/Salome-VLVERSION-univ_public.run \
"http://www.salome-platform.org/downloads/current-version/DownloadDistr?platform=UniBinNew2&version=VERSION_64bit"
fi
mkdir -p /opt/
cd /opt
sh /tmp/Salome-VLVERSION-univ_public.run -t /opt/salome -d
rm /tmp/Salome-VLVERSION-univ_public.run
# # To use on Cluster with InfinyBand and Slurm
# # !!! Watch out depends on Release !!!
# apt-get -y install dapl2-utils \
# libdapl2 \
# libibverbs1 \
# librdmacm1 \
# libcxgb3-1 \
# libipathverbs1 \
# libmlx4-1 \
# libmlx5-1 \
# libmthca1 \
# libnes1 \
# libpmi0
# clean up
apt-get -y autoclean