-
Notifications
You must be signed in to change notification settings - Fork 0
/
apptainer.def
54 lines (44 loc) · 1.71 KB
/
apptainer.def
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
Bootstrap: docker
From: ubuntu:24.04
%arguments
env_path=./environment.yml
%setup
mkdir -p ${APPTAINER_ROOTFS}/tmp_data
if [ -f {{ env_path }} ]; then \
cp {{ env_path }} ${APPTAINER_ROOTFS}/tmp_data/environment.yml.tmp \
else \
touch ${APPTAINER_ROOTFS}/tmp_data/environment.yml.tmp; \
fi
%post
apt-get update && apt-get install -y \
openjdk-17-jdk \
maven \
python3 \
python3-pip \
unzip \
wget \
git \
&& apt-get clean
# Install Osmosis
wget --quiet https://github.com/openstreetmap/osmosis/releases/download/0.48.3/osmosis-0.48.3.zip -O /tmp_data/osmosis.zip && \
unzip /tmp_data/osmosis.zip -d /opt/osmosis && \
rm /tmp_data/osmosis.zip && \
ln -s /opt/osmosis/bin/osmosis /usr/local/bin/osmosis
# Install Miniconda
wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp_data/miniconda.sh && \
/bin/bash /tmp_data/miniconda.sh -b -p /opt/conda && \
rm /tmp_data/miniconda.sh
if [ ! -s /tmp_data/environment.yml.tmp ]; then \
wget --quiet https://raw.githubusercontent.com/eqasim-org/ile-de-france/refs/heads/develop/environment.yml -O /tmp_data/environment.yml; \
else \
mv /tmp_data/environment.yml.tmp /tmp_data/environment.yml; \
fi
# Create conda environment from environment.yml
/opt/conda/bin/conda env create -f /tmp_data/environment.yml -n eqasim && \
rm /tmp_data/environment.yml
%environment
export DEBIAN_FRONTEND=noninteractive
export PATH=/opt/conda/bin:$PATH
source /opt/conda/bin/activate eqasim
%runscript
exec python -m synpp "$@"