πΎ Register versioned toil container pipelines, singularity containers, and python packages.
This package is available at PyPi:
pip install register_apps
This package it's used to register versionized and containerized applications within a production environment. It provides 3 commands:
- π‘
register_toil
- π¦
register_singularity
- π
register_python
-
π‘
register_toil
will install toil container pipelines in separate virtual environments, pull a singularity image from the dockerhub and create executables that call the pipeline with the right parameters:register_toil \ --pypi_name toil_disambiguate \ --pypi_version v0.1.2 \ --bindir /example/bin \ --optdir /example/opt \ --tmpvar $TMP \ --volumes /ifs /ifs
Given this call, the following directory structure is created:
/example/ βββ bin βΒ Β βββ toil_disambiguate_v0.1.2 -> /example/opt/toil_disambiguate/v0.1.2/toil_disambiguate βββ opt βββ toil_disambiguate βββ v0.1.2 βββ toil_disambiguate βββ toil_disambiguate-v0.1.2.simg
And the executables look like this:
cat /example/bin/toil_disambiguate #!/bin/bash /path/to/.virtualenvs/production__toil_disambiguate__v0.1.2/bin/toil_disambiguate $@ \ --singularity /example/opt/toil_disambiguate/v0.1.2/toil_disambiguate-v0.1.2.simg \ --volumes /ifs /ifs \ --workDir $TMP_DIR
-
π¦
register_singularity
provides a similar usage to register regular commands that will run inside a container, it will create the same directory structure but the executables created will execute commands inside the container:register_singularity \ --target svaba \ --command svaba \ --image_url docker://papaemmelab/docker-svaba:v1.0.0 \ --bindir /example/bin \ --optdir /example/opt \ --tmpvar $TMP \ --volumes /ifs /ifs
Given this call, the following directory structure is created:
/example/ βββ bin βΒ Β βββ svaba -> /example/opt/docker-svaba/v1.0.0/svaba βββ opt βββ docker_svaba βββ v1.0.0 βββ svaba βββ docker-svaba-v1.0.0
And the executables look like this:
cat /example/bin/svaba #!/bin/bash singularity exec \ --workdir $TMP_DIR/${USER}_docker-svaba_v1.0.0_`uuidgen` \ --pwd `pwd` \ --bind /ifs:/ifs \ /example/opt/docker-svaba/v1.0.0/docker-svaba-v1.0.0.simg svaba "$@"
-
π
register_python
provides a method to register python packages without registering to run inside a container. It will create a similiar versionized directory structure and installing the python package and its dependencies within a virtual environemnt:register_python \ --pypi_name click_annotvcf \ --pypi_version v1.0.7 --bindir /example/bin \ --optdir /example/opt
Given this call, the following directory structure is created:
/example/ βββ bin βΒ Β βββ click_annotvcf_v1.0.7 -> /example/opt/click_annotvcfs/v1.0.7/click_annotvcf βββ opt βββ click_annotvcf βββ v1.0.7 βββ click_annotvcf
And the executables look like this:
cat /example/bin/click_annotvcf_v1.0.7 #!/bin/bash /path/to/.virtualenvs/production__click_annotvcf__v1.0.7/bin/click_annotvcf "$@"
Contributions are welcome, and they are greatly appreciated, check our contributing guidelines!
This package was created using Cookiecutter and the papaemmelab/cookiecutter-toil project template.