Bootstrap: docker
From: ubuntu:24.04

%files

%environment
    export LC_ALL=C    

%post
    export LC_ALL=C    
    export DEBIAN_FRONTEND=noninteractive

    apt -y update

    apt -y install build-essential
    apt -y install libtbb-dev
    apt -y install python3-dev
    apt -y install python3-pip


    pip3 install numpy --break-system-packages
    pip3 install Pillow --break-system-packages
    pip3 install tbb --break-system-packages
    pip3 install numba --break-system-packages

    # --break-system-packages is needed to allow installation of packages that
    # are already installed by the system package manager, but with different
    # versions.
%runscript

%test
    python3 --version
    python3 -c "import numpy; print('numpy', numpy.__version__)"
    python3 -c "import PIL; print('PIL', PIL.__version__)"
    python3 -c "import numba; print('numba', numba.__version__)"

%labels
    Author      uros (dot) lotric (at) fri (dot) uni (dash) lj (dot) si
    Container   Python with some scientific libraries
    Version     1.0
    Description Workshop advanced supercomputing (Superračunalištvo bolj zares)

%help
    Python container with libraries:
        numpy: computation
        PIL: image manipulation
        tbb: thread building blocks
        numba: parallel processing with just in time compilation 
