annotate cc.def @ 3:9376bcef72f5

version from 2023-11-26, never built?
author Henry S Thompson <ht@inf.ed.ac.uk>
date Thu, 15 Aug 2024 12:45:53 +0100
parents 400a79fbe694
children 8bbade4dc167
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
1 Bootstrap: docker
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
2 From: debian:bullseye
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
3
2
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
4 %files
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
5 /usr/local/bin/stats
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
6
0
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
7 %post
1
19b134ea79c8 cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 0
diff changeset
8 sed 's/PS1/PSone/' -i .singularity.d/env/99-base.sh
19b134ea79c8 cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 0
diff changeset
9
0
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
10 sed '2s/main/main contrib non-free/' -i /etc/apt/sources.list
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
11 apt-get -y update
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
12 apt-get -y install locales
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
13 sed '/en_GB.UTF/s/# //;/en_US.UTF/s/# //' -i /etc/locale.gen
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
14 locale-gen
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
15 apt-get -y install apt-utils python3 python3-pip isal less git ack procps psmisc
3
9376bcef72f5 version from 2023-11-26, never built?
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 2
diff changeset
16 apt-get -y install man-db gdb emacs sqlite3 curl unzip imagemagick file rsync
2
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
17 apt-get -y install moreutils mercurial qpdf xsel xclip tmux xfce4-terminal
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
18 apt-get -y install default-jdk nano jq r-base
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
19 apt-get -y install libcld2-0 libcld2-dev
3
9376bcef72f5 version from 2023-11-26, never built?
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 2
diff changeset
20 apt-get -y install libxmu-dev libxft-dev libxaw7-dev libgdbm-dev
9376bcef72f5 version from 2023-11-26, never built?
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 2
diff changeset
21 apt-get -y install libgdbm-compat-dev libgmp-dev libssl-dev xbitmaps
1
19b134ea79c8 cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 0
diff changeset
22 # do this after the above in order to
19b134ea79c8 cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 0
diff changeset
23 # hide the moreutils version of parallel as moreutils.parallel
19b134ea79c8 cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 0
diff changeset
24 apt-get -y install parallel
2
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
25 # Allow access to cirrus modules
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
26 apt-get -y install environment-modules
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
27 echo 'module() { eval `/usr/bin/modulecmd bash $*`; }' >> /etc/bashrc
0
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
28
2
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
29 apt-get -y install python3-tk
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
30 pip3 install isal stopit cffi
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
31 # not clear how to make these visible to anaconda/python module
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
32
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
33 echo "install.packages(c('txtplot','ggplot2'))" | R BATCH --no-save
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
34
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
35 CFLAGS='-Wno-narrowing' pip3 install cld2-cffi
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
36 # Below not needed if we get anaconda/python3 working...
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
37 # Most are now in ~hst/.local/lib/python3.9/site-labs/
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
38 # pip3 install six regex chardet urllib3 cryptography
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
39 # pip3 install scipy matplotlib statsmodels
0
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
40
1
19b134ea79c8 cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 0
diff changeset
41 cd /usr/local/src
2
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
42
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
43 curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
44 unzip awscliv2.zip
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
45 ./aws/install
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
46
1
19b134ea79c8 cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 0
diff changeset
47 git clone https://github.com/htInEdin/pdfminer.six.git
19b134ea79c8 cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 0
diff changeset
48 git clone https://github.com/htInEdin/pdfx.git
19b134ea79c8 cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 0
diff changeset
49 cd pdfminer.six
19b134ea79c8 cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 0
diff changeset
50 git checkout preferLoggingToWarning
19b134ea79c8 cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 0
diff changeset
51 cd ../pdfx
19b134ea79c8 cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 0
diff changeset
52 git checkout tidy_up_link_extraction
19b134ea79c8 cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 0
diff changeset
53 cd /usr/local/lib/python3.9/dist-packages/
19b134ea79c8 cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 0
diff changeset
54 ln -s /usr/local/src/pdfx/pdfx .
19b134ea79c8 cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 0
diff changeset
55 ln -s /usr/local/src/pdfminer.six/pdfminer .
19b134ea79c8 cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 0
diff changeset
56
0
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
57 sed '8i\
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
58 if [ "$WSHARED" ]\
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
59 then\
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
60 PATH="$WSHARED/bin:$PATH"\
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
61 fi\
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
62 ' -i /etc/profile
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
63
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
64 # REMEMBER to check cc/etc/profile has $WSHARED/bin in front of PATH
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
65
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
66 %environment
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
67 export WSHARED=/work/dc007/dc007/shared
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
68 export HOME=/work/dc007/dc007/$(whoami)
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
69 export SINGULARITY_SHELL=/usr/bin/bash
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
70 export LESSOPEN="| /usr/bin/lesspipe %s";
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
71 export LESSCLOSE="/usr/bin/lesspipe %s %s";
3
9376bcef72f5 version from 2023-11-26, never built?
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 2
diff changeset
72 export SS='$SING'
2
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
73 export SING=sing
3
9376bcef72f5 version from 2023-11-26, never built?
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 2
diff changeset
74 export PS1='\[\033[1m\]$SS\[\033[0m\]<\!>: '
2
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
75 if [ -f "$HOME/.singrc" ]
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
76 then
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
77 . "$HOME/.singrc"
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
78 fi
0
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
79
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
80 %runscript
2
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
81 #!/bin/bash
0
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
82 if [ -f $WSHARED/.bash_extras ]
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
83 then
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
84 . $WSHARED/.bash_extras
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
85 fi
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
86
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
87 cd $HOME
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
88
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
89 if [ $# -gt 0 ]
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
90 then
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
91 exec "$@"
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
92 else
2
400a79fbe694 cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 1
diff changeset
93 exec /bin/bash --login
0
f5509fb303f6 ccr version from 2022-06-14
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
94 fi