-
Notifications
You must be signed in to change notification settings - Fork 0
/
singularity.def
51 lines (46 loc) · 1.77 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
50
51
BootStrap: docker
From: fedora:35
%files
runjulia.sh /opt/runjulia.sh
SlurmMonitor.jl.zip /opt/SlurmMonitor.jl.zip
%post
dnf install -y wget openssh-clients git g++ unzip
cd /opt
#git clone https://github.com/bencardoen/SlurmMonitor.jl
wget https://julialang-s3.julialang.org/bin/linux/x64/1.7/julia-1.7.1-linux-x86_64.tar.gz
mkdir -p /opt/julia
mv julia-1.7.1-linux-x86_64.tar.gz /opt/julia
cd /opt/julia
tar -xf julia-1.7.1-linux-x86_64.tar.gz
export PATH=/opt/julia/julia-1.7.1/bin:$PATH
mkdir -p /opt/juliadepot
export JULIA_DEPOT_PATH=/opt/juliadepot
cd /opt
unzip -q /opt/SlurmMonitor.jl.zip
cd /opt/SlurmMonitor.jl
julia --project=/opt/SlurmMonitor.jl -e 'using Pkg; Pkg.update(); ENV["PYTHON"]=""; Pkg.build(); Pkg.instantiate()'
julia --project=/opt/SlurmMonitor.jl -e 'using SlurmMonitor'
julia --project=/opt/SlurmMonitor.jl -e 'using Pkg; Pkg.build("SlurmMonitor")'
#julia --project=/opt/SlurmMonitor.jl -e 'using Pkg; Pkg.test("SlurmMonitor")'
#julia --project=. --trace-compile=dc_precompile.jl src/precompile.jl
#julia --project=. src/setupimage.jl
rm -rf /opt/juliadepot/logs
ln -s /dev/shm/ /opt/juliadepot/logs
%environment
export LC_ALL=C
export PATH=/opt/julia/julia-1.7.1/bin:$PATH
export JULIA_DEPOT_PATH=/opt/juliadepot
%runscript
echo "Container was created $NOW"
echo "Arguments received: $*"
echo pwd
exec echo "$@"
/opt/runjulia.sh "$@"
%labels
Author Ben Cardoen, bcardoen@sfu.ca
Version v0.0.1
%help
This is a container to offer SPECHT without altering the local user environment, for testing purposes.
singularity exec julia --project=/opt/SPECHT.jl
or
#julia --project=/opt/SPECHT.jl --sysimage /opt/SPECHT.jl/sys_img.so