Mercurial > hg > sif
annotate cc.def @ 2:400a79fbe694
cc version from 2023-08-05
author | Henry S Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Thu, 15 Aug 2024 12:44:43 +0100 |
parents | 19b134ea79c8 |
children | 9376bcef72f5 |
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 | |
2
400a79fbe694
cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
1
diff
changeset
|
16 apt-get -y install man-db gdb emacs xemacs21 sqlite3 curl unzip feh |
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 |
1
19b134ea79c8
cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
0
diff
changeset
|
20 # 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
|
21 # 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
|
22 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
|
23 # Allow access to cirrus modules |
400a79fbe694
cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
1
diff
changeset
|
24 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
|
25 echo 'module() { eval `/usr/bin/modulecmd bash $*`; }' >> /etc/bashrc |
0 | 26 |
2
400a79fbe694
cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
1
diff
changeset
|
27 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
|
28 pip3 install isal stopit cffi |
400a79fbe694
cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
1
diff
changeset
|
29 # 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
|
30 |
400a79fbe694
cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
1
diff
changeset
|
31 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
|
32 |
400a79fbe694
cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
1
diff
changeset
|
33 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
|
34 # 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
|
35 # 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
|
36 # 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
|
37 # pip3 install scipy matplotlib statsmodels |
0 | 38 |
1
19b134ea79c8
cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
0
diff
changeset
|
39 cd /usr/local/src |
2
400a79fbe694
cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
1
diff
changeset
|
40 |
400a79fbe694
cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
1
diff
changeset
|
41 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
|
42 unzip awscliv2.zip |
400a79fbe694
cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
1
diff
changeset
|
43 ./aws/install |
400a79fbe694
cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
1
diff
changeset
|
44 |
1
19b134ea79c8
cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
0
diff
changeset
|
45 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
|
46 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
|
47 cd pdfminer.six |
19b134ea79c8
cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
0
diff
changeset
|
48 git checkout preferLoggingToWarning |
19b134ea79c8
cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
0
diff
changeset
|
49 cd ../pdfx |
19b134ea79c8
cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
0
diff
changeset
|
50 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
|
51 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
|
52 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
|
53 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
|
54 |
0 | 55 sed '8i\ |
56 if [ "$WSHARED" ]\ | |
57 then\ | |
58 PATH="$WSHARED/bin:$PATH"\ | |
59 fi\ | |
60 ' -i /etc/profile | |
61 | |
62 # REMEMBER to check cc/etc/profile has $WSHARED/bin in front of PATH | |
63 | |
64 %environment | |
65 export WSHARED=/work/dc007/dc007/shared | |
66 export HOME=/work/dc007/dc007/$(whoami) | |
67 export SINGULARITY_SHELL=/usr/bin/bash | |
68 export LESSOPEN="| /usr/bin/lesspipe %s"; | |
69 export LESSCLOSE="/usr/bin/lesspipe %s %s"; | |
2
400a79fbe694
cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
1
diff
changeset
|
70 export SING=sing |
400a79fbe694
cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
1
diff
changeset
|
71 export PS1='\[\033[1m\]$SING\[\033[0m\]<\!>: ' |
400a79fbe694
cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
1
diff
changeset
|
72 if [ -f "$HOME/.singrc" ] |
400a79fbe694
cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
1
diff
changeset
|
73 then |
400a79fbe694
cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
1
diff
changeset
|
74 . "$HOME/.singrc" |
400a79fbe694
cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
1
diff
changeset
|
75 fi |
0 | 76 |
77 %runscript | |
2
400a79fbe694
cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
1
diff
changeset
|
78 #!/bin/bash |
0 | 79 if [ -f $WSHARED/.bash_extras ] |
80 then | |
81 . $WSHARED/.bash_extras | |
82 fi | |
83 | |
84 cd $HOME | |
85 | |
86 if [ $# -gt 0 ] | |
87 then | |
88 exec "$@" | |
89 else | |
2
400a79fbe694
cc version from 2023-08-05
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
1
diff
changeset
|
90 exec /bin/bash --login |
0 | 91 fi |