# HG changeset patch # User mbernt # Date 1691335271 0 # Node ID 9512201417a58467dd5cc65d9b7b01afa37ed793 planemo upload for repository https://github.com/bernt-matthias/mb-galaxy-tools/tree/master/tools/scripting/ commit 9e9a0860d255a1fd6c43edd0fde9ea538ee679de diff -r 000000000000 -r 9512201417a5 README.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.rst Sun Aug 06 15:21:11 2023 +0000 @@ -0,0 +1,23 @@ +Note to admins: +=============== + +These tool allow users to execute arbitrary scripts in containers +(with singularity or apptainer). The interpreter (python, Rscript, +bash, ...) and the containers is configured by the admin using the +``scripting_images`` data table. + +A basic level of security comes by the execution in containers. +Additional parameters that should be passed to the container engine +can be configured. + +Admins should consider the following points: + +- Passing the ``--cleanenv`` variable is certainy a good idea. +- The tool will mount the galaxy files dir for reading and only the + job working dir should be writable (might depend on your configuraion). + It's advisable to use the ``--no-mount`` option to disable additional + mounts that might be writable. +- Maybe disable or limit network usage, eg. for singularity ``--network none`` + +This tool has been inspired by the [scriptrunner](https://github.com/ARTbio/docker-scriptrunner/blob/master/scriptrunner.xml) tool +which works with docker. diff -r 000000000000 -r 9512201417a5 general.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/general.xml Sun Aug 06 15:21:11 2023 +0000 @@ -0,0 +1,415 @@ + + singularity + + + + + + + $code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ^[-].*$ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 000000000000 -r 9512201417a5 macros.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/macros.xml Sun Aug 06 15:21:11 2023 +0000 @@ -0,0 +1,121 @@ + + + + + $code + + + + + + + + + + + + + + + + + + + + + + + ^[-].*$ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 000000000000 -r 9512201417a5 test-data/scripting_images.loc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/scripting_images.loc Sun Aug 06 15:21:11 2023 +0000 @@ -0,0 +1,10 @@ +# + +# docker://continuumio/anaconda3 +python_continuumio_anaconda python (continuumio/anaconda) /tmp/anaconda3_latest.sif python singularity --cleanenv --network none --no-mount bind-paths + +# docker://rocker/tidyverse +r_rocker_tidyverse R (tidyverse) /tmp/tidyverse_latest.sif Rscript apptainer + +# docker://rocker/tidyverse +bash_continuumio_anaconda bash (continuumio/anaconda) /tmp/anaconda3_latest.sif bash apptainer --cleanenv --network none --no-mount bind-paths \ No newline at end of file diff -r 000000000000 -r 9512201417a5 test-data/test.feather Binary file test-data/test.feather has changed diff -r 000000000000 -r 9512201417a5 test-data/test.h5 Binary file test-data/test.h5 has changed diff -r 000000000000 -r 9512201417a5 test-data/test.rds Binary file test-data/test.rds has changed diff -r 000000000000 -r 9512201417a5 test-data/test.tsv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/test.tsv Sun Aug 06 15:21:11 2023 +0000 @@ -0,0 +1,3 @@ +A B +1 2 +2 1 diff -r 000000000000 -r 9512201417a5 tool-data/scripting_images.loc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool-data/scripting_images.loc Sun Aug 06 15:21:11 2023 +0000 @@ -0,0 +1,20 @@ +# the following six tab separated columns need to be set +# +# id +# a unique id to be used +# name +# name shown to the user +# image_name +# a path or URL to an image to use. Note that when using URLs +# it images will be pulled on the fly to the job working dir +# and the user executing the tools needs to take care of the +# image cache. +# interpreter +# the interpreter that should be applied to the user supplied scripts +# container_type +# apptainer/singularity +# container_params +# parameters to be passed to singularity/apptainer +# --cleanenv --network none --no-mount bind-paths --cpus "\${GALAXY_SLOTS:-1}" +# +# \t\t\t\t\t diff -r 000000000000 -r 9512201417a5 tool_data_table_conf.xml.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_data_table_conf.xml.sample Sun Aug 06 15:21:11 2023 +0000 @@ -0,0 +1,7 @@ + + + + value, name, image, interpreter, container_type, container_params + +
+
diff -r 000000000000 -r 9512201417a5 tool_data_table_conf.xml.test --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_data_table_conf.xml.test Sun Aug 06 15:21:11 2023 +0000 @@ -0,0 +1,6 @@ + + + value, name, image, interpreter, container_type, container_params + +
+
\ No newline at end of file