-
Notifications
You must be signed in to change notification settings - Fork 0
/
Singularity.7.1.0.52
60 lines (52 loc) · 1.18 KB
/
Singularity.7.1.0.52
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
Bootstrap: docker
From: alpine:3.16
Stage: build
%post
VERSION='7.1.0-52'
## Download build prerequisites
apk add --no-cache \
build-base \
libtool \
libheif-dev \
libpng-dev \
libjpeg-turbo-dev \
tiff-dev \
librsvg-dev \
libraw-dev \
libzip-dev \
curl
## get src
cd /tmp
curl -sL https://github.com/ImageMagick/ImageMagick/archive/refs/tags/${VERSION}.tar.gz | tar -xz
cd ImageMagick-${VERSION}
# build
./configure --prefix=/opt/imagemagick --with-modules=yes --with-rsvg=yes
make
make install
# Final stage
Bootstrap: docker
From: alpine:3.16
Stage: final
%labels
Maintainer [email protected]
Version 7.1.0.52-r0
%files from build
/opt/imagemagick /opt/imagemagick
%post
# add runtime libs
apk add --no-cache \
libtool \
libheif \
libpng \
libjpeg-turbo \
tiff \
librsvg \
libraw \
libzip
%runscript
if [ -x /opt/imagemagick/bin/$SINGULARITY_NAME ]; then
exec /opt/imagemagick/bin/$SINGULARITY_NAME "$@"
else
/bin/echo -e "This Singularity image cannot provide a single entrypoint. Please use \"singularity exec $SINGULARITY_NAME <cmd>\", where <cmd> is one of the following:\n"
exec ls /opt/imagemagick/bin
fi