Mercurial > hg > sif
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 |
rev | line source |
---|---|
0 | 1 Bootstrap: docker |
2 From: debian:bullseye | |
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 | 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 | 10 sed '2s/main/main contrib non-free/' -i /etc/apt/sources.list |
11 apt-get -y update | |
12 apt-get -y install locales | |
13 sed '/en_GB.UTF/s/# //;/en_US.UTF/s/# //' -i /etc/locale.gen | |
14 locale-gen | |
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 | 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 | 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 | 57 sed '8i\ |
58 if [ "$WSHARED" ]\ | |
59 then\ | |
60 PATH="$WSHARED/bin:$PATH"\ | |
61 fi\ | |
62 ' -i /etc/profile | |
63 | |
64 # REMEMBER to check cc/etc/profile has $WSHARED/bin in front of PATH | |
65 | |
66 %environment | |
67 export WSHARED=/work/dc007/dc007/shared | |
68 export HOME=/work/dc007/dc007/$(whoami) | |
69 export SINGULARITY_SHELL=/usr/bin/bash | |
70 export LESSOPEN="| /usr/bin/lesspipe %s"; | |
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 | 79 |
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 | 82 if [ -f $WSHARED/.bash_extras ] |
83 then | |
84 . $WSHARED/.bash_extras | |
85 fi | |
86 | |
87 cd $HOME | |
88 | |
89 if [ $# -gt 0 ] | |
90 then | |
91 exec "$@" | |
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 | 94 fi |