view 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
line wrap: on
line source

Bootstrap: docker
From: debian:bullseye

%post
    sed 's/PS1/PSone/' -i .singularity.d/env/99-base.sh

    sed '2s/main/main contrib non-free/' -i /etc/apt/sources.list
    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 man-db gdb emacs xemacs21 sqlite3
    apt-get -y install moreutils
    # do this after the above in order to
    # hide the moreutils version of parallel as moreutils.parallel
    apt-get -y install parallel

    pip3 install six isal regex chardet stopit urllib3 cryptography
    
    cd /usr/local/src
    git clone https://github.com/htInEdin/pdfminer.six.git
    git clone https://github.com/htInEdin/pdfx.git
    cd pdfminer.six
    git checkout preferLoggingToWarning
    cd ../pdfx
    git checkout tidy_up_link_extraction
    cd /usr/local/lib/python3.9/dist-packages/
    ln -s /usr/local/src/pdfx/pdfx .
    ln -s /usr/local/src/pdfminer.six/pdfminer .

    sed '8i\
  if [ "$WSHARED" ]\
  then\
   PATH="$WSHARED/bin:$PATH"\
  fi\
' -i /etc/profile

    # REMEMBER to check cc/etc/profile has $WSHARED/bin in front of PATH

%environment
export WSHARED=/work/dc007/dc007/shared
export HOME=/work/dc007/dc007/$(whoami)
export SINGULARITY_SHELL=/usr/bin/bash
export LESSOPEN="| /usr/bin/lesspipe %s";
export LESSCLOSE="/usr/bin/lesspipe %s %s";
export PS1='\[\033[1m\]sing\[\033[0m\]<\!>: '

%runscript
v#!/bin/bash
if [ -f $WSHARED/.bash_extras ]
then
 . $WSHARED/.bash_extras
fi

cd $HOME

if [ $# -gt 0 ]
then
 exec "$@"
else
 exec /bin/bash -ls 
fi