Mercurial > hg > sif
comparison cc.def @ 7:c7fa30d1f666
lots of changes to upgrade debian to trixie,
later patches to include cython3 and wget and always echo HOME
| author | Henry S Thompson <ht@inf.ed.ac.uk> |
|---|---|
| date | Sun, 11 Oct 2026 23:17:33 +0100 |
| parents | c0aed2a91657 |
| children | 4b78177439c3 |
comparison
equal
deleted
inserted
replaced
| 6:c0aed2a91657 | 7:c7fa30d1f666 |
|---|---|
| 1 Bootstrap: docker | 1 Bootstrap: docker |
| 2 From: debian:bullseye | 2 From: debian:trixie |
| 3 | 3 |
| 4 %files | 4 %files |
| 5 /usr/local/bin/stats /usr/local/bin | 5 /usr/local/bin/stats /usr/local/bin |
| 6 /etc/krb5.conf /etc | 6 /etc/krb5.conf /etc |
| 7 | 7 |
| 8 %post | 8 %post |
| 9 sed 's/PS1/PSone/' -i .singularity.d/env/99-base.sh | 9 sed 's/PS1/PSone/' -i .singularity.d/env/99-base.sh |
| 10 | 10 |
| 11 sed '2s/main/main contrib non-free/' -i /etc/apt/sources.list | 11 sed '2s/main/main contrib non-free/' -i /etc/apt/sources.list.d/debian.sources |
| 12 | |
| 13 #echo "debconf debconf/frontend select readline" | debconf-set-selections | |
| 14 export DEBIAN_FRONTEND=noninteractive | |
| 15 | |
| 12 apt-get -y update | 16 apt-get -y update |
| 13 apt-get -y install locales | 17 apt-get -y install locales |
| 14 sed '/en_GB.UTF/s/# //;/en_US.UTF/s/# //' -i /etc/locale.gen | 18 sed '/en_GB.UTF/s/# //;/en_US.UTF/s/# //' -i /etc/locale.gen |
| 15 locale-gen | 19 locale-gen |
| 16 apt-get -y install apt-utils python3 python3-pip isal less git ack procps psmisc | 20 apt-get -y install apt-utils isal less git ack procps psmisc |
| 17 apt-get -y install man-db gdb emacs sqlite3 curl unzip imagemagick file rsync | 21 apt-get -y install man-db gdb emacs sqlite3 curl unzip imagemagick file rsync |
| 18 apt-get -y install moreutils mercurial qpdf xsel xclip tmux xfce4-terminal | 22 apt-get -y install moreutils mercurial qpdf xsel xclip tmux xfce4-terminal |
| 19 apt-get -y install default-jdk nano jq r-base | 23 apt-get -y install default-jdk nano jq r-base |
| 20 apt-get -y install libcld2-0 libcld2-dev | 24 apt-get -y install libcld2-0 libcld2-dev |
| 21 apt-get -y install libxmu-dev libxft-dev libxaw7-dev libgdbm-dev | 25 apt-get -y install libxmu-dev libxft-dev libxaw7-dev libgdbm-dev |
| 22 apt-get -y install libgdbm-compat-dev libgmp-dev libssl-dev xbitmaps | 26 apt-get -y install libgdbm-compat-dev libgmp-dev libssl-dev xbitmaps |
| 27 apt-get -y install maven ant ivy autoconf libtool wget | |
| 23 # do this after the above in order to | 28 # do this after the above in order to |
| 24 # hide the moreutils version of parallel as moreutils.parallel | 29 # hide the moreutils version of parallel as moreutils.parallel |
| 25 apt-get -y install parallel | 30 apt-get -y install parallel |
| 26 # Allow access to cirrus modules | 31 # Allow access to cirrus modules |
| 27 apt-get -y install environment-modules | 32 apt-get -y install environment-modules |
| 28 echo 'module() { eval `/usr/bin/modulecmd bash $*`; }' >> /etc/bashrc | 33 echo 'module() { eval `/usr/bin/modulecmd bash $*`; }' >> /etc/bashrc |
| 29 | 34 |
| 30 apt-get -y install python3-tk | 35 apt-get -y install python3-tk python3-stopit python3-cffi python3-full |
| 31 pip3 install isal stopit cffi | 36 |
| 32 # not clear how to make these visible to anaconda/python module | 37 apt-get -y install python3-six python3-regex python3-chardet |
| 33 | 38 apt-get -y install python3-urllib3 python3-cryptography |
| 39 apt-get -y install python3-scipy python3-matplotlib python3-statsmodels | |
| 40 apt-get -y install python3-boto3 | |
| 41 apt-get -y install cython3 | |
| 42 | |
| 43 apt-get -y install cpanminus | |
| 44 | |
| 45 export PIP_BREAK_SYSTEM_PACKAGES=1 | |
| 46 # See /usr/share/doc/python3.11/README.venv for why this may be bad | |
| 47 | |
| 48 pip3 install isal | |
| 49 export CXXFLAGS='-std=c++98' | |
| 50 export CFLAGS='-Wno-narrowing' | |
| 51 pip3 install setuptools # there's a deb for this, but it didn't work | |
| 52 # for the cld2-cffi build | |
| 53 pip3 install cld2-cffi | |
| 54 unset CXXFLAGS CFLAGS | |
| 55 | |
| 56 # DEPRECATION: Building 'cld2-cffi' using the legacy setup.py | |
| 57 # bdist_wheel mechanism, which will be removed in a future | |
| 58 # version. pip 25.3 will enforce this behaviour change. A possible | |
| 59 # replacement is to use the standardized build interface by setting | |
| 60 # the `--use-pep517` option, (possibly combined with | |
| 61 # `--no-build-isolation`), or adding a `pyproject.toml` file to the | |
| 62 # source tree of 'cld2-cffi'. Discussion can be found at | |
| 63 # https://github.com/pypa/pip/issues/6334 | |
| 64 | |
| 65 pip3 install surt | |
| 66 pip3 install idna | |
| 67 pip3 install pyarrow | |
| 68 | |
| 34 echo "install.packages(c('txtplot','ggplot2'))" | R BATCH --no-save | 69 echo "install.packages(c('txtplot','ggplot2'))" | R BATCH --no-save |
| 35 | 70 |
| 36 CFLAGS='-Wno-narrowing' pip3 install cld2-cffi | |
| 37 # Below not needed if we get anaconda/python3 working... | |
| 38 # Most are now in ~hst/.local/lib/python3.9/site-labs/ | |
| 39 # pip3 install six regex chardet urllib3 cryptography | |
| 40 # pip3 install scipy matplotlib statsmodels | |
| 41 | |
| 42 cd /usr/local/src | 71 cd /usr/local/src |
| 43 | 72 |
| 44 curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | 73 curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" |
| 45 unzip awscliv2.zip | 74 unzip awscliv2.zip |
| 46 ./aws/install | 75 ./aws/install |
| 49 git clone https://github.com/htInEdin/pdfx.git | 78 git clone https://github.com/htInEdin/pdfx.git |
| 50 cd pdfminer.six | 79 cd pdfminer.six |
| 51 git checkout preferLoggingToWarning | 80 git checkout preferLoggingToWarning |
| 52 cd ../pdfx | 81 cd ../pdfx |
| 53 git checkout tidy_up_link_extraction | 82 git checkout tidy_up_link_extraction |
| 54 cd /usr/local/lib/python3.9/dist-packages/ | 83 cd /usr/local/lib/python3.13/dist-packages/ |
| 55 ln -s /usr/local/src/pdfx/pdfx . | 84 ln -s /usr/local/src/pdfx/pdfx . |
| 56 ln -s /usr/local/src/pdfminer.six/pdfminer . | 85 ln -s /usr/local/src/pdfminer.six/pdfminer . |
| 86 | |
| 87 cpan -u | |
| 88 cpanm File::Rename | |
| 89 | |
| 90 unset DEBIAN_FRONTEND PIP_BREAK_SYSTEM_PACKAGES | |
| 57 | 91 |
| 58 sed '8i\ | 92 sed '8i\ |
| 59 if [ "$WSHARED" ]\ | 93 if [ "$WSHARED" ]\ |
| 60 then\ | 94 then\ |
| 61 PATH="$WSHARED/bin:$PATH"\ | 95 PATH="$WSHARED/bin:$PATH"\ |
| 78 . "$HOME/.singrc" | 112 . "$HOME/.singrc" |
| 79 fi | 113 fi |
| 80 | 114 |
| 81 %runscript | 115 %runscript |
| 82 #!/bin/bash | 116 #!/bin/bash |
| 117 | |
| 83 if [ -f $WSHARED/.bash_extras ] | 118 if [ -f $WSHARED/.bash_extras ] |
| 84 then | 119 then |
| 85 . $WSHARED/.bash_extras | 120 . $WSHARED/.bash_extras |
| 121 fi | |
| 122 | |
| 123 if [ ! -r $HOME ] | |
| 124 then | |
| 125 export HOME=/work/dc007/shared/guest | |
| 126 export USER=guest | |
| 86 fi | 127 fi |
| 87 | 128 |
| 88 cd $HOME | 129 cd $HOME |
| 89 | 130 |
| 90 if [ $# -gt 0 ] | 131 if [ $# -gt 0 ] |
| 91 then | 132 then |
| 92 exec "$@" | 133 exec "$@" |
| 93 else | 134 else |
| 135 echo HOME is $HOME | |
| 94 exec /bin/bash --login | 136 exec /bin/bash --login |
| 95 fi | 137 fi |
