-
Notifications
You must be signed in to change notification settings - Fork 6
/
apptainer.def
42 lines (32 loc) · 982 Bytes
/
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
Bootstrap: docker
From: mambaorg/micromamba:1.5
Stage: build
%files
. /opt/mldatafind/
%post
mkdir -p /cvmfs /hdfs /gpfs /ceph /hadoop
# install git for pip installation
apt-get update
apt-get install -y --no-install-recommends git
apt-get clean
# activate micromamba and create environment from lockfile
/bin/bash /root/.bashrc
micromamba create -p /opt/env -f /opt/mldatafind/conda-lock.yml
# install poetry so we can install local deps of deps editably
micromamba run -p /opt/env python -m \
pip install --no-build-isolation \
poetry
micromamba run -p /opt/env \
poetry config virtualenvs.create false
cd /opt/mldatafind/
micromamba run -p /opt/env \
poetry install
# initialize our shell so that we can execute
# commands in our environment at run time
micromamba shell init --shell=bash --root-prefix=~/micromamba
export PATH=/opt/env/bin:$PATH
%runscript
#!/bin/bash
eval "$(micromamba shell hook --shell bash)"
micromamba activate /opt/env
exec "$@"