forked from smsharma/mining-for-substructure-lens
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Singularity
47 lines (35 loc) · 981 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
37
38
39
40
41
42
43
44
45
46
47
Bootstrap: docker
From: ubuntu:latest
%post
apt-get update && apt-get install -y --no-install-recommends \
build-essential \
python3 \
python3-dev \
git \
ca-certificates \
python3-distutils \
curl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# NEEDED: Disable certain interactive features when installing certain packages (e.g. specify timezone, language etc)
export DEBIAN_FRONTEND=noninteractive
export PATH="/opt/conda/bin:$PATH"
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
git clone https://github.com/pyprob/mining-for-substructure-lens.git /code
# install pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py && rm get-pip.py
# install dark_matter dependencies
cd code
pip install -r requirements.txt
sed -i 's/pipenv run python/python3/g' simple_test_script.bash
# make working directory
%runscript
if [ $# -eq 0 ]; then
echo "No arguments supplied"
else
cd code
# parse all arguments with $@
exec $@
fi