Mercurial > hg > sif
annotate cc.def @ 1:19b134ea79c8
cctest version from 2022-06-29
author | Henry S Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Thu, 15 Aug 2024 12:44:11 +0100 |
parents | f5509fb303f6 |
children | 400a79fbe694 |
rev | line source |
---|---|
0 | 1 Bootstrap: docker |
2 From: debian:bullseye | |
3 | |
4 %post | |
1
19b134ea79c8
cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
0
diff
changeset
|
5 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
|
6 |
0 | 7 sed '2s/main/main contrib non-free/' -i /etc/apt/sources.list |
8 apt-get -y update | |
9 apt-get -y install locales | |
10 sed '/en_GB.UTF/s/# //;/en_US.UTF/s/# //' -i /etc/locale.gen | |
11 locale-gen | |
12 apt-get -y install apt-utils python3 python3-pip isal less git ack procps psmisc | |
1
19b134ea79c8
cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
0
diff
changeset
|
13 apt-get -y install man-db gdb emacs xemacs21 sqlite3 |
19b134ea79c8
cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
0
diff
changeset
|
14 apt-get -y install moreutils |
19b134ea79c8
cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
0
diff
changeset
|
15 # 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
|
16 # 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
|
17 apt-get -y install parallel |
0 | 18 |
19 pip3 install six isal regex chardet stopit urllib3 cryptography | |
20 | |
1
19b134ea79c8
cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
0
diff
changeset
|
21 cd /usr/local/src |
19b134ea79c8
cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
0
diff
changeset
|
22 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
|
23 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
|
24 cd pdfminer.six |
19b134ea79c8
cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
0
diff
changeset
|
25 git checkout preferLoggingToWarning |
19b134ea79c8
cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
0
diff
changeset
|
26 cd ../pdfx |
19b134ea79c8
cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
0
diff
changeset
|
27 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
|
28 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
|
29 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
|
30 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
|
31 |
0 | 32 sed '8i\ |
33 if [ "$WSHARED" ]\ | |
34 then\ | |
35 PATH="$WSHARED/bin:$PATH"\ | |
36 fi\ | |
37 ' -i /etc/profile | |
38 | |
39 # REMEMBER to check cc/etc/profile has $WSHARED/bin in front of PATH | |
40 | |
41 %environment | |
42 export WSHARED=/work/dc007/dc007/shared | |
43 export HOME=/work/dc007/dc007/$(whoami) | |
44 export SINGULARITY_SHELL=/usr/bin/bash | |
45 export LESSOPEN="| /usr/bin/lesspipe %s"; | |
46 export LESSCLOSE="/usr/bin/lesspipe %s %s"; | |
47 export PS1='\[\033[1m\]sing\[\033[0m\]<\!>: ' | |
48 | |
49 %runscript | |
1
19b134ea79c8
cctest version from 2022-06-29
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
0
diff
changeset
|
50 v#!/bin/bash |
0 | 51 if [ -f $WSHARED/.bash_extras ] |
52 then | |
53 . $WSHARED/.bash_extras | |
54 fi | |
55 | |
56 cd $HOME | |
57 | |
58 if [ $# -gt 0 ] | |
59 then | |
60 exec "$@" | |
61 else | |
62 exec /bin/bash -ls | |
63 fi |