-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSingularity
39 lines (32 loc) · 932 Bytes
/
Singularity
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
Bootstrap: docker
From: godlovedc/lolcow:latest
%runscript
echo
echo ===============================================
echo Attempting to install lolcow in ~/lolcow
echo ===============================================
echo
if [ -d "/home/$USER/lolcow" ]; then
echo "~/lolcow already exists"
echo "will not overwrite"
echo
exit 1
fi
mkdir ~/lolcow
cp -r GodloveD-lolcow-installer* ~/lolcow/image
cd ~/lolcow
cat > lolcow.sh <<"EOF"
#!/bin/bash
# if you want to bind some host directories...
# export SINGULARTY_BINDPATH=/some,/dirs,/to,/bind
dir=$(dirname "$0")
cmd=$(basename "$0")
arg="$@"
singularity exec $dir/image $cmd $arg
EOF
chmod 755 lolcow.sh
ln -s lolcow.sh fortune
ln -s lolcow.sh cowsay
ln -s lolcow.sh lolcat
cowsay 'type "export PATH=~/lolcow:$PATH" and enjoy fortune, cowsay, and lolcat!' |\
lolcat