diff 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
line wrap: on
line diff
--- a/cc.def	Fri Aug 16 17:36:52 2024 +0100
+++ b/cc.def	Sun Oct 11 23:17:33 2026 +0100
@@ -1,5 +1,5 @@
 Bootstrap: docker
-From: debian:bullseye
+From: debian:trixie
 
 %files
    /usr/local/bin/stats /usr/local/bin
@@ -8,18 +8,23 @@
 %post
     sed 's/PS1/PSone/' -i .singularity.d/env/99-base.sh
 
-    sed '2s/main/main contrib non-free/' -i /etc/apt/sources.list
+    sed '2s/main/main contrib non-free/' -i /etc/apt/sources.list.d/debian.sources
+
+    #echo "debconf debconf/frontend select readline" | debconf-set-selections
+    export DEBIAN_FRONTEND=noninteractive
+
     apt-get -y update
     apt-get -y install locales
     sed '/en_GB.UTF/s/# //;/en_US.UTF/s/# //' -i /etc/locale.gen
     locale-gen
-    apt-get -y install apt-utils python3 python3-pip isal less git ack procps psmisc
+    apt-get -y install apt-utils isal less git ack procps psmisc
     apt-get -y install man-db gdb emacs sqlite3 curl unzip imagemagick file rsync
     apt-get -y install moreutils mercurial qpdf xsel xclip tmux xfce4-terminal
     apt-get -y install default-jdk nano jq r-base
     apt-get -y install libcld2-0 libcld2-dev
     apt-get -y install libxmu-dev libxft-dev libxaw7-dev libgdbm-dev
     apt-get -y install libgdbm-compat-dev libgmp-dev libssl-dev xbitmaps
+    apt-get -y install maven ant ivy autoconf libtool wget
     # do this after the above in order to
     # hide the moreutils version of parallel as moreutils.parallel
     apt-get -y install parallel
@@ -27,18 +32,42 @@
     apt-get -y install environment-modules
     echo 'module() { eval `/usr/bin/modulecmd bash $*`; }' >> /etc/bashrc
 
-    apt-get -y install python3-tk
-    pip3 install isal stopit cffi
-    # not clear how to make these visible to anaconda/python module
-    
+    apt-get -y install python3-tk python3-stopit python3-cffi python3-full
+
+    apt-get -y install python3-six python3-regex python3-chardet
+    apt-get -y install python3-urllib3 python3-cryptography
+    apt-get -y install python3-scipy python3-matplotlib python3-statsmodels
+    apt-get -y install python3-boto3
+    apt-get -y install cython3
+
+    apt-get -y install cpanminus
+
+    export PIP_BREAK_SYSTEM_PACKAGES=1
+    # See /usr/share/doc/python3.11/README.venv for why this may be bad
+
+    pip3 install isal
+    export CXXFLAGS='-std=c++98'
+    export CFLAGS='-Wno-narrowing'
+    pip3 install setuptools # there's a deb for this, but it didn't work
+                            #  for the cld2-cffi build
+    pip3 install cld2-cffi
+    unset CXXFLAGS CFLAGS
+
+# DEPRECATION: Building 'cld2-cffi' using the legacy setup.py
+# bdist_wheel mechanism, which will be removed in a future
+# version. pip 25.3 will enforce this behaviour change. A possible
+# replacement is to use the standardized build interface by setting
+# the `--use-pep517` option, (possibly combined with
+# `--no-build-isolation`), or adding a `pyproject.toml` file to the
+# source tree of 'cld2-cffi'. Discussion can be found at
+# https://github.com/pypa/pip/issues/6334
+
+    pip3 install surt
+    pip3 install idna
+    pip3 install pyarrow
+
     echo "install.packages(c('txtplot','ggplot2'))" | R BATCH --no-save
 
-    CFLAGS='-Wno-narrowing' pip3 install cld2-cffi
-    # Below not needed if we get anaconda/python3 working...
-    # Most are now in ~hst/.local/lib/python3.9/site-labs/
-    # pip3 install six regex chardet urllib3 cryptography
-    # pip3 install scipy matplotlib statsmodels
-    
     cd /usr/local/src
 
     curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
@@ -51,10 +80,15 @@
     git checkout preferLoggingToWarning
     cd ../pdfx
     git checkout tidy_up_link_extraction
-    cd /usr/local/lib/python3.9/dist-packages/
+    cd /usr/local/lib/python3.13/dist-packages/
     ln -s /usr/local/src/pdfx/pdfx .
     ln -s /usr/local/src/pdfminer.six/pdfminer .
 
+    cpan -u
+    cpanm File::Rename
+
+    unset DEBIAN_FRONTEND PIP_BREAK_SYSTEM_PACKAGES
+
     sed '8i\
   if [ "$WSHARED" ]\
   then\
@@ -80,16 +114,24 @@
 
 %runscript
 #!/bin/bash
+
 if [ -f $WSHARED/.bash_extras ]
 then
  . $WSHARED/.bash_extras
 fi
 
+if [ ! -r $HOME ]
+then
+ export HOME=/work/dc007/shared/guest
+ export USER=guest
+fi
+
 cd $HOME
 
 if [ $# -gt 0 ]
 then
  exec "$@"
 else
+ echo HOME is $HOME
  exec /bin/bash --login
 fi