From 2f90458cf8bddd454bdbc93139f09e080a03775b Mon Sep 17 00:00:00 2001 From: Maja Jablonska <majajjablonska@gmail.com> Date: Tue, 31 Oct 2023 16:39:31 +0100 Subject: [PATCH] Add .def file --- singularity.def | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 singularity.def diff --git a/singularity.def b/singularity.def new file mode 100644 index 0000000..ea23763 --- /dev/null +++ b/singularity.def @@ -0,0 +1,35 @@ +Bootstrap: docker +From: python:3.9 + +%environment +export PYTHONPATH=. + +%files + ./setup.py + ./combo + +%post + + # run dpkg (behind other tools like apt-get) without interactive dialogue + + export DEBIAN_FRONTEND=noninteractive + + apt-get -y update + + apt-get -y install git ffmpeg virtualenv libopenmpi-dev openmpi-bin openmpi-common python3-pip python3-dev g++ gcc + + # upgrade system pip, see: https://stackoverflow.com/a/49836753/7983111 + + apt-get -y install build-essential + + python3 -m pip install --upgrade pip + + # install python dependencies + #python3 -m pip install -r requirements.txt + #python3 -m pip install -r requirements_no_deps.txt --no-dependencies + python3 -m pip install . + python3 -m pip install protobuf + python3 -m spacy download en_core_web_sm + +%runscript + python3 -u ./combo/main.py "$@" -- GitLab