-
Notifications
You must be signed in to change notification settings - Fork 1
/
singularity.def
50 lines (41 loc) · 1.29 KB
/
singularity.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
Bootstrap: docker
#From: ubuntu:focal
From: debian:bookworm
%environment
# export PYTHONPATH=/usr/local/lib/python3:/usr/local/lib/python3/dist-packages
export LC_ALL="C"
%labels
AUTHOR [email protected]
Maintainer: Christophe Trophime
Maintainer_email: [email protected]
Version 1.0
%post
# Add specific package for magnet
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get -y install debian-keyring lsb-release
ln -sf /usr/share/keyrings/debian-maintainers.gpg /etc/apt/trusted.gpg.d/
echo "deb http://euler.lncmig.local/[email protected]/debian/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/lncmi.list
apt-get update
apt-get -y upgrade
apt-get -y install openmpi-bin
apt-get -y install python-is-python3 python3-magnetgeo python3-magnetgmsh
export DEBIAN_FRONTEND
# create custom motd
# Install figlet!
apt update
apt install -y figlet
cat > /.singularity.d/env/99-motd.sh <<EOF
case \$0 in
/.singularity.d/actions/shell)
figlet MagnetGmsh
echo
echo "Hello \$USER from shell" ;;
/.singularity.d/actions/exec)
echo "Hello \$USER from exec" ;;
/.singularity.d/actions/run)
echo "Hello \$USER from run" ;;
/.singularity.d/actions/test)
echo "Hello \$USER from test" ;;
esac
EOF