-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Singularity definition file for building fully static executables
- Loading branch information
1 parent
ff299cf
commit 5da7a98
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
Bootstrap: library | ||
From: twesterhout/default/alpine-openblas:latest | ||
Stage: build_openblas | ||
|
||
Bootstrap: docker | ||
From: utdemir/ghc-musl:v17-ghc884 | ||
Stage: base | ||
|
||
%files from build_openblas | ||
/usr/lib/libopenblas* /usr/lib/ | ||
/usr/include/cblas.h /usr/include/ | ||
/usr/include/f77blas.h /usr/include/ | ||
/usr/include/lapack.h /usr/include/ | ||
/usr/include/openblas_config.h /usr/include/ | ||
/usr/lib/pkgconfig/blas.pc /usr/lib/pkgconfig/blas.pc | ||
/usr/lib/pkgconfig/lapack.pc /usr/lib/pkgconfig/lapack.pc | ||
|
||
%post | ||
set -eu | ||
export LC_ALL=C.UTF-8 | ||
export CABAL_DIR=/usr/local/.cabal | ||
BUILD=0 | ||
|
||
apk update | ||
apk add --no-cache \ | ||
build-base gcc g++ gfortran cmake linux-headers python3 \ | ||
git pkgconfig hdf5-dev hdf5-static | ||
cabal v2-update | ||
# Creating .pc files for hdf5 and hdf5_hl | ||
ln -s /usr/lib/pkgconfig/hdf5-1.12.0.pc /usr/lib/pkgconfig/hdf5.pc | ||
ln -s /usr/lib/pkgconfig/hdf5_hl-1.12.0.pc /usr/lib/pkgconfig/hdf5_hl.pc | ||
|
||
mkdir -p /project/spin-ed.local | ||
if [ $BUILD -eq 1 ]; then | ||
cd /project | ||
git clone --depth=1 "https://github.com/twesterhout/spin-ed.git" | ||
cd spin-ed/ | ||
cabal v2-build --enable-executable-static | ||
fi | ||
|
||
%environment | ||
export LC_ALL=C.UTF-8 | ||
export CABAL_DIR=/usr/local/.cabal | ||
export TERM=xterm-256color |