-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSingularity
More file actions
35 lines (27 loc) · 969 Bytes
/
Singularity
File metadata and controls
35 lines (27 loc) · 969 Bytes
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
Bootstrap: docker
From: ubuntu:22.04
%environment
# Activate Conda by default
export PATH="/opt/conda/bin:$PATH"
source /opt/conda/etc/profile.d/conda.sh
conda activate base
%post
echo "Installing dependencies..."
apt-get update && apt-get install -y wget bzip2 git && rm -rf /var/lib/apt/lists/*
echo "Installing Miniconda..."
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh
bash /tmp/miniconda.sh -b -p /opt/conda
rm /tmp/miniconda.sh
echo "Setting up conda..."
export PATH="/opt/conda/bin:$PATH"
source /opt/conda/etc/profile.d/conda.sh
conda init
conda config --set always_yes yes --set changeps1 no
echo "Copying environment.yml and creating environment..."
mkdir /opt/env
cp /environment.yml /opt/env/environment.yml
conda env create -f /opt/env/environment.yml
%files
environment.yml /environment.yml
%runscript
exec "$@"