-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathSingularity
58 lines (44 loc) · 1.61 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
Bootstrap: docker
From: ubuntu:20.04
%post
apt-get update -y && apt-get install -y build-essential bc wget git unzip
rm -rf /var/lib/apt/lists/*
CONDA_INSTALL_PATH="/opt/miniconda"
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $CONDA_INSTALL_PATH
rm -r miniconda.sh
. $CONDA_INSTALL_PATH/etc/profile.d/conda.sh
mkdir /bart_dir
cd /bart_dir
mkdir run
git clone --recursive https://github.com/exosports/BART BART/
conda env create -f /bart_dir/BART/environment.yml
conda activate bart
echo ". $CONDA_INSTALL_PATH/etc/profile.d/conda.sh" >> /.singularity_bashrc
echo "conda activate bart" >> /.singularity_bashrc
cd /bart_dir/BART/modules/transit/
make
cd /bart_dir/BART/modules/MCcubed/
make
%environment
CONDA_INSTALL_PATH="/opt/miniconda"
CONDA_BIN_PATH="/opt/minconda/bin"
SINGULARITY_SHELL=/bin/bash
topdir="/bart_dir"
action="${0##*/}"
if [ "$action" == "shell" ]; then
if [ "${SINGULARITY_SHELL:-}" == "/bin/bash" ]; then
set -- --noprofile --init-file /.singularity_bashrc
elif test -z "${SINGULARITY_SHELL:-}"; then
export SINGULARITY_SHELL=/bin/bash
set -- --noprofile --init-file /.singularity_bashrc
fi
fi
export PATH="$CONDA_BIN_PATH:$PATH"
export topdir
%runscript
exec /bin/bash --noprofile --init-file /.singularity_bashrc "$@"
%labels
Maintainer David Wright <[email protected]>
License See README or /bart_dir/BART/license in container
Version v1.0