Commit 5a071cbe authored by Valentin Vautrot's avatar Valentin Vautrot

Retrieve custom pipeline python packages from remote git clone instead of own's local repository

parent 68835196
......@@ -21,15 +21,9 @@ Other custom GAD packages include GeneralTools, LabkeyTools, InterTools, VcfTool
SINGULARITY_ROOTFS=$APPTAINER_ROOTFS
mkdir ${SINGULARITY_ROOTFS}/data
%files
# import custom python packages from local machine
/home/valentinv/Documents/GitLab/gadpipeline/common/GeneralTools.py /data/
/home/valentinv/Documents/GitLab/gadpipeline/common/LabkeyTools.py /data/
/home/valentinv/Documents/GitLab/gadpipeline/common/InterTools.py /data/
/home/valentinv/Documents/GitLab/gadpipeline/common/VcfTools.py /data/
/home/valentinv/Documents/GitLab/gadpipeline/common/CnvTools.py /data/
%post
GAD_VERSION=2.11.0
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
......@@ -39,18 +33,15 @@ dnf update -y --exclude=filesystem
# filesystem packages updates poses problems by tempering with /proc, which is supposed to be owned by root, but is not in the .sif image
dnf remove -y python3 && dnf autoremove
dnf install -y python39
dnf install -y python39 git-2.27.0-1.el8.x86_64
# install non-pip python packages
mv /data/GeneralTools.py /usr/lib/python3.9/site-packages/
mv /data/LabkeyTools.py /usr/lib/python3.9/site-packages/
# import of LabkeyTools.py in python3 causes error (TabError - indentation). Probably compatibility problem from python2
mv /data/InterTools.py /usr/lib/python3.9/site-packages/
mv /data/VcfTools.py /usr/lib/python3.9/site-packages/
mv /data/CnvTools.py /usr/lib/python3.9/site-packages/
git clone --branch ${GAD_VERSION} http://gitlab.gad-bioinfo.org/gad/gadpipeline.git /data/gadpipeline/
mv -v /data/gadpipeline/common/GeneralTools.py /data/gadpipeline/common/LabkeyTools.py /data/gadpipeline/common/InterTools.py /data/gadpipeline/common/VcfTools.py /data/gadpipeline/common/CnvTools.py /usr/lib/python3.9/site-packages/
# install python pip packages
pip3.9 install --upgrade -t /usr/lib/python3.9/site-packages/ labkey
pip3.9 install --upgrade -t /usr/lib/python3.9/site-packages/ labkey==1.4.0
pip3.9 install --upgrade -t /usr/lib/python3.9/site-packages/ numpy
pip3.9 install --upgrade -t /usr/lib/python3.9/site-packages/ matplotlib
pip3.9 install --upgrade -t /usr/lib/python3.9/site-packages/ pandas
......@@ -62,13 +53,14 @@ pip3.9 install --upgrade -t /usr/lib/python3.9/site-packages/ pyvcf
pip3.9 install --upgrade -t /usr/lib/python3.9/site-packages/ simplejson
#cleaning
rmdir /data/
rm -rf /data/
%test
echo "python version :"
python3 -V
echo "listing installed pip packages :"
python3 -m pip list
echo "Version of gadpipeline used to create this image: \"${GAD_VERSION}\", to retrieve custom gadpipeline python packages"
%labels
Contained_OS_version CentOS_8.5.211
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment