-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathSingularity
101 lines (74 loc) · 2.34 KB
/
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
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
95
96
97
98
99
100
101
Bootstrap: docker
From: continuumio/miniconda3
# sudo singularity build sregistry.simg Singularity
#######################################
# Global
#######################################
%runscript
exec /opt/conda/bin/sregistry "$@"
#######################################
# Google Cloud Storage
#######################################
%appenv google-storage
SREGISTRY_CLIENT=google-storage
export SREGISTRY_CLIENT
%apprun google-storage
exec /opt/conda/bin/sregistry "$@"
#######################################
# Google Cloud Drive
#######################################
%appenv google-drive
SREGISTRY_CLIENT=google-drive
export SREGISTRY_CLIENT
%apprun google-drive
exec /opt/conda/bin/sregistry "$@"
#######################################
# Globus
#######################################
%appenv globus
SREGISTRY_CLIENT=globus
export SREGISTRY_CLIENT
%apprun globus
exec /opt/conda/bin/sregistry "$@"
#######################################
# Singularity Hub
#######################################
%appenv hub
SREGISTRY_CLIENT=hub
export SREGISTRY_CLIENT
%apprun hub
exec /opt/conda/bin/sregistry "$@"
#######################################
# Singularity Registry
#######################################
%appenv registry
SREGISTRY_CLIENT=registry
export SREGISTRY_CLIENT
%apprun registry
exec /opt/conda/bin/sregistry "$@"
%environment
PATH=/usr/local/bin:/opt/conda/bin:$PATH
export PATH
%labels
maintainer vsochat@stanford.edu
%post
apt-get update && apt-get install -y git build-essential \
libtool \
squashfs-tools \
libarchive-dev \
autotools-dev \
automake \
autoconf \
uuid-dev \
libssl-dev
export PATH=/opt/conda/bin:$PATH
/opt/conda/bin/pip install dateutils
# Install Singularity
cd /opt && git clone https://www.github.com/singularityware/singularity.git && cd singularity
./autogen.sh && ./configure --prefix=/usr/local && make && make install
# Install SRegistry Global
cd /opt && git clone https://www.github.com/singularityhub/sregistry-cli
cd sregistry-cli
/opt/conda/bin/pip install setuptools
# This installs all "install extras"
/opt/conda/bin/pip install -e .[all]