-
Notifications
You must be signed in to change notification settings - Fork 6
/
slidefactory.def
46 lines (43 loc) · 1.36 KB
/
slidefactory.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
BootStrap: library
From: ubuntu:20.04
%environment
export SLIDEFACTORY_CONTAINER=/lib/slidefactory
export SLIDEFACTORY_VERSION=1.x
%post
apt update && apt install -y software-properties-common && apt update
add-apt-repository universe
add-apt-repository ppa:phd/chromium-browser
apt update
apt install -y python3-pip pandoc python3-pandocfilters
apt install -y fonts-noto fonts-inconsolata
apt install -y git
apt install -y chromium-browser
apt install -y cabal-install nvi
cabal update
mkdir -p /root/.cabal/bin
cabal install pandoc-types-1.17.5.4
cabal install pandoc-emphasize-code
apt-get remove -y --autoremove cabal-install
url=https://github.com/csc-training/slide-template
git clone --recursive $url $SINGULARITY_ROOTFS/lib/slidefactory
%runscript
_SLIDEFACTORY_PATH=$SLIDEFACTORY
if test "$_SLIDEFACTORY_PATH" = ""
then
_SLIDEFACTORY_PATH=$SLIDEFACTORY_CONTAINER
fi
if test "$1" = "--version"
then
shift
echo $SLIDEFACTORY_VERSION
elif test "$1" = "--update"
then
shift
exec python3 $_SLIDEFACTORY_PATH/setup/update.py --as-container "$@"
elif test "$1" = "--install"
then
shift
exec python3 $_SLIDEFACTORY_PATH/setup/install.py "$@"
else
exec python3 $_SLIDEFACTORY_PATH/convert.py --as-container "$@"
fi