-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathApptainer
More file actions
89 lines (70 loc) · 2.04 KB
/
Apptainer
File metadata and controls
89 lines (70 loc) · 2.04 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
Bootstrap: docker
From: ubuntu:24.04
Stage: build
%files
. /opt/loki
%post
# Set noninteractive mode for apt
export DEBIAN_FRONTEND=noninteractive
# Update and install dependencies
apt-get update
apt-get install -y \
build-essential \
cmake \
git \
wget \
ca-certificates \
libboost-dev \
ccache \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
cd /opt/loki
# Build and install dependencies
cmake -S dependencies -B dependencies/build -DCMAKE_INSTALL_PREFIX=dependencies/installs
cmake --build dependencies/build -j$(nproc)
# Build Loki
cmake -S . -B build \
-DCMAKE_PREFIX_PATH=/opt/loki/dependencies/installs \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTS=OFF \
-DBUILD_BENCHMARKS=OFF
cmake --build build -j$(nproc)
# Install Loki to a staging directory
cmake --install build --prefix=/opt/loki/install
# Runtime stage
Bootstrap: docker
From: ubuntu:24.04
Stage: runtime
%files from build
/opt/loki/install /usr/local
/opt/loki/build/exe/loki /usr/local/bin/loki
/opt/loki/dependencies/installs/lib /usr/local/lib
%post
# Install only runtime dependencies
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y \
libstdc++6 \
libgomp1 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Update library cache
ldconfig
%environment
export LC_ALL=C
export PATH=/usr/local/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
%runscript
exec loki "$@"
%labels
Author Dominik Drexler
Description Loki PDDL parser and translator
%help
This is a container for Loki, a C++20 library for syntactic and semantic
parsing and translation of PDDL files.
Usage:
apptainer run loki.sif <domain.pddl> <problem.pddl>
Or start an interactive shell:
apptainer shell loki.sif
The loki executable is available at /usr/local/bin/loki