forked from Jellby/Pegamoid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSingularity
36 lines (32 loc) · 944 Bytes
/
Singularity
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
Bootstrap: docker
From: python:3.4-slim
%help
Pegamoid is an orbital viewer
Use the -vgl option to run with vglrun
%post
# update apt for installing packages
apt-get update
# install packages needed for compiling pyside
deps="wget make cmake gcc g++ qt4-default"
apt-get install -y --no-install-recommends $deps
# install packages needed for OpenGL and vglrun
apt-get install -y --no-install-recommends libqtgui4 mesa-utils libgl1-mesa-dri libxv1
# install vglrun
wget https://downloads.sourceforge.net/project/virtualgl/2.5.2/virtualgl_2.5.2_amd64.deb
dpkg -i virtualgl_2.5.2_amd64.deb
rm virtualgl_2.5.2_amd64.deb
# install required python packages
pip install --upgrade pip
pip install qtpy pyside vtk numpy h5py
# remove build dependencies
apt-get purge -y --auto-remove $deps
%files
pegamoid.py /bin
%runscript
ulimit -c 0
if [ "$1" = "-vgl" ]; then
shift
vglrun python /bin/pegamoid.py "$@"
else
python /bin/pegamoid.py "$@"
fi