-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcentos_singularity22.def
54 lines (47 loc) · 2.52 KB
/
centos_singularity22.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
50
51
52
53
# Copyright (c) 2015-2016, Gregory M. Kurtzer. All rights reserved.
#
# "Singularity" Copyright (c) 2016, The Regents of the University of California,
# through Lawrence Berkeley National Laboratory (subject to receipt of any
# required approvals from the U.S. Dept. of Energy). All rights reserved.
BootStrap: yum
OSVersion: 7
MirrorURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/os/$basearch/
Include: yum
# If you want the updates (available at the bootstrap date) to be installed
# inside the container during the bootstrap instead of the General Availability
# point release (7.x) then uncomment the following line
#UpdateURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/updates/$basearch/
%setup
mkdir "$SINGULARITY_ROOTFS/mcr"
mkdir -p "$SINGULARITY_ROOTFS/chm_singularity_test_data/images"
mkdir -p "$SINGULARITY_ROOTFS/chm_singularity_test_data/labels"
cp testdata/images/*.png "$SINGULARITY_ROOTFS/chm_singularity_test_data/images"
cp testdata/labels/*.png "$SINGULARITY_ROOTFS/chm_singularity_test_data/labels"
cp testdata/testimage.png "$SINGULARITY_ROOTFS/chm_singularity_test_data"
cp mcr_installopts.txt "$SINGULARITY_ROOTFS/mcr"
cp runscript.sh "$SINGULARITY_ROOTFS/singularity"
chmod a+rx "$SINGULARITY_ROOTFS/singularity"
VERSION=`cat VERSION | sed "s/\n//g"`
sed -i "s/@@VERSION@@/$VERSION/g" "$SINGULARITY_ROOTFS/singularity"
if [ -e MCR_R2013a_glnxa64_installer.zip ] ; then
echo "Matlab compiled runtime found in current directory. Copying to image"
cp MCR_R2013a_glnxa64_installer.zip "$SINGULARITY_ROOTFS"
fi
%post
echo "Hello from inside the container"
yum -y install vim-minimal make python python-devel git wget tar cmake epel-release tcsh unzip java-1.8.0-openjdk libXt libXt-devel java-1.8.0-openjdk-devel java-1.8.0-openjdk-headless libXmu libXmu-devel ImageMagick
mkdir -p /oasis /projects /data /state/partition1 /scratch /scratch1 /scratch2 /ccdbprod
cd /
wget https://www.sci.utah.edu/releases/chm_v2.1.367/chm-compiled-r2013a-2.1.367.tar.gz
tar -zxf chm-compiled-r2013a-2.1.367.tar.gz
rm /chm-compiled-r2013a-2.1.367.tar.gz
if [ ! -e /MCR_R2013a_glnxa64_installer.zip ] ; then
echo "Downloading Matlab Compiled Runtime"
wget https://www.mathworks.com/supportfiles/MCR_Runtime/R2013a/MCR_R2013a_glnxa64_installer.zip
fi
unzip -d mcr MCR_R2013a_glnxa64_installer.zip
cd /mcr
./install -inputFile mcr_installopts.txt
rm /MCR_R2013a_glnxa64_installer.zip
%test
/singularity verify /tmp