Build branch main with version main (2b29a47)

Build pipeline: viash-hub.biobox.main-bjgnf

Source commit: 2b29a47575

Source message: Bedtools GroupBY (#123)

* Initial Commit

* Update config.vsh.yaml

* config file

* script.sh

* adding some tests

* more test

* Update CHANGELOG.md

* deleted test_data

* bug fix

* Update config.vsh.yaml

* adding more links

* exit on error

* $TMPDIR

* Update script.sh

* Update config.vsh.yaml

* Suggested change on column option

---------

Co-authored-by: Jakub Majercik <57993790+jakubmajercik@users.noreply.github.com>
This commit is contained in:
CI
2024-09-02 13:18:11 +00:00
parent b17c19f92e
commit 18d6cad4c4
232 changed files with 32974 additions and 2381 deletions

View File

@@ -157,15 +157,15 @@ build_info:
engine: "docker|native"
output: "target/executable/busco/busco_download_datasets"
executable: "target/executable/busco/busco_download_datasets/busco_download_datasets"
viash_version: "0.9.0-RC6"
git_commit: "766ab6c9c3059004c7c3f205621909b2d8b0b26d"
viash_version: "0.9.0-RC7"
git_commit: "2b29a47575db9dbdff8448b287925c25d9a8b01d"
git_remote: "https://github.com/viash-hub/biobox"
package_config:
name: "biobox"
version: "main"
description: "A collection of bioinformatics tools for working with sequence data.\n"
info: null
viash_version: "0.9.0-RC6"
viash_version: "0.9.0-RC7"
source: "src"
target: "target"
config_mods:

View File

@@ -2,7 +2,7 @@
# busco_download_datasets main
#
# This wrapper script is auto-generated by viash 0.9.0-RC6 and is thus a
# This wrapper script is auto-generated by viash 0.9.0-RC7 and is thus a
# derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
# Data Intuitive.
#
@@ -57,24 +57,24 @@ function ViashRemoveFlags {
# $1 : Should always be set to ${BASH_SOURCE[0]}
# returns : The absolute path of the bash file
function ViashSourceDir {
SOURCE="$1"
while [ -h "$SOURCE" ]; do
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
local source="$1"
while [ -h "$source" ]; do
local dir="$( cd -P "$( dirname "$source" )" >/dev/null 2>&1 && pwd )"
source="$(readlink "$source")"
[[ $source != /* ]] && source="$dir/$source"
done
cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd
cd -P "$( dirname "$source" )" >/dev/null 2>&1 && pwd
}
# ViashFindTargetDir: return the path of the '.build.yaml' file, following symlinks
# usage : ViashFindTargetDir 'ScriptPath'
# $1 : The location from where to start the upward search
# returns : The absolute path of the '.build.yaml' file
function ViashFindTargetDir {
SOURCE="$1"
while [[ "$SOURCE" != "" && ! -e "$SOURCE/.build.yaml" ]]; do
SOURCE=${SOURCE%/*}
local source="$1"
while [[ "$source" != "" && ! -e "$source/.build.yaml" ]]; do
source=${source%/*}
done
echo $SOURCE
echo $source
}
# see https://en.wikipedia.org/wiki/Syslog#Severity_level
VIASH_LOGCODE_EMERGENCY=0
@@ -215,9 +215,9 @@ function ViashDockerInstallationCheck {
fi
ViashDebug "Checking whether the Docker daemon is running"
save=$-; set +e
docker_version=$(docker version --format '{{.Client.APIVersion}}' 2> /dev/null)
out=$?
local save=$-; set +e
local docker_version=$(docker version --format '{{.Client.APIVersion}}' 2> /dev/null)
local out=$?
[[ $save =~ e ]] && set -e
if [ $out -ne 0 ]; then
ViashCritical "Docker daemon does not seem to be running. Try one of the following:"
@@ -269,9 +269,9 @@ function ViashDockerPull {
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
docker pull $1 && return 0 || return 1
else
save=$-; set +e
local save=$-; set +e
docker pull $1 2> /dev/null > /dev/null
out=$?
local out=$?
[[ $save =~ e ]] && set -e
if [ $out -ne 0 ]; then
ViashWarning "Could not pull from '$1'. Docker image doesn't exist or is not accessible."
@@ -291,7 +291,8 @@ function ViashDockerPull {
# echo $? # returns '1'
function ViashDockerPush {
ViashNotice "Pushing image to '$1'"
save=$-; set +e
local save=$-; set +e
local out
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
docker push $1
out=$?
@@ -315,9 +316,9 @@ function ViashDockerPush {
# examples:
# ViashDockerPullElseBuild mynewcomponent
function ViashDockerPullElseBuild {
save=$-; set +e
local save=$-; set +e
ViashDockerPull $1
out=$?
local out=$?
[[ $save =~ e ]] && set -e
if [ $out -ne 0 ]; then
ViashDockerBuild $@
@@ -474,9 +475,9 @@ RUN busco --version | sed 's/BUSCO\s\(.*\)/busco: "\1"/' > /var/software_version
LABEL org.opencontainers.image.authors="Dorien Roosen"
LABEL org.opencontainers.image.description="Companion container for running component busco busco_download_datasets"
LABEL org.opencontainers.image.created="2024-08-21T11:35:59Z"
LABEL org.opencontainers.image.created="2024-09-02T13:02:47Z"
LABEL org.opencontainers.image.source="https://gitlab.com/ezlab/busco"
LABEL org.opencontainers.image.revision="766ab6c9c3059004c7c3f205621909b2d8b0b26d"
LABEL org.opencontainers.image.revision="2b29a47575db9dbdff8448b287925c25d9a8b01d"
LABEL org.opencontainers.image.version="main"
VIASHDOCKER
@@ -503,6 +504,9 @@ function ViashDockerBuildArgs {
# ViashAbsolutePath /foo/bar/.. # returns /foo
function ViashAbsolutePath {
local thePath
local parr
local outp
local len
if [[ ! "$1" =~ ^/ ]]; then
thePath="$PWD/$1"
else
@@ -533,14 +537,17 @@ function ViashAbsolutePath {
)
}
# ViashDockerAutodetectMount: auto configuring docker mounts from parameters
# $1 : The parameter value
# returns : New parameter
# $VIASH_DIRECTORY_MOUNTS : Added another parameter to be passed to docker
# $1 : The parameter value
# returns : New parameter
# $VIASH_DIRECTORY_MOUNTS : Added another parameter to be passed to docker
# $VIASH_DOCKER_AUTOMOUNT_PREFIX : The prefix to be used for the automounts
# examples:
# ViashDockerAutodetectMount /path/to/bar # returns '/viash_automount/path/to/bar'
# ViashDockerAutodetectMountArg /path/to/bar # returns '--volume="/path/to:/viash_automount/path/to"'
function ViashDockerAutodetectMount {
abs_path=$(ViashAbsolutePath "$1")
local abs_path=$(ViashAbsolutePath "$1")
local mount_source
local base_name
if [ -d "$abs_path" ]; then
mount_source="$abs_path"
base_name=""
@@ -548,7 +555,7 @@ function ViashDockerAutodetectMount {
mount_source=`dirname "$abs_path"`
base_name=`basename "$abs_path"`
fi
mount_target="/viash_automount$mount_source"
local mount_target="$VIASH_DOCKER_AUTOMOUNT_PREFIX$mount_source"
if [ -z "$base_name" ]; then
echo "$mount_target"
else
@@ -556,7 +563,9 @@ function ViashDockerAutodetectMount {
fi
}
function ViashDockerAutodetectMountArg {
abs_path=$(ViashAbsolutePath "$1")
local abs_path=$(ViashAbsolutePath "$1")
local mount_source
local base_name
if [ -d "$abs_path" ]; then
mount_source="$abs_path"
base_name=""
@@ -564,17 +573,22 @@ function ViashDockerAutodetectMountArg {
mount_source=`dirname "$abs_path"`
base_name=`basename "$abs_path"`
fi
mount_target="/viash_automount$mount_source"
local mount_target="$VIASH_DOCKER_AUTOMOUNT_PREFIX$mount_source"
ViashDebug "ViashDockerAutodetectMountArg $1 -> $mount_source -> $mount_target"
echo "--volume=\"$mount_source:$mount_target\""
}
function ViashDockerStripAutomount {
abs_path=$(ViashAbsolutePath "$1")
echo "${abs_path#/viash_automount}"
local abs_path=$(ViashAbsolutePath "$1")
echo "${abs_path#$VIASH_DOCKER_AUTOMOUNT_PREFIX}"
}
# initialise variables
VIASH_DIRECTORY_MOUNTS=()
# configure default docker automount prefix if it is unset
if [ -z "${VIASH_DOCKER_AUTOMOUNT_PREFIX+x}" ]; then
VIASH_DOCKER_AUTOMOUNT_PREFIX="/viash_automount"
fi
# initialise docker variables
VIASH_DOCKER_RUN_ARGS=(-i --rm)
@@ -647,6 +661,18 @@ while [[ $# -gt 0 ]]; do
VIASH_MODE='dockerfile'
shift 1
;;
---docker_run_args)
VIASH_DOCKER_RUN_ARGS+=("$2")
shift 2
;;
---docker_run_args=*)
VIASH_DOCKER_RUN_ARGS+=("$(ViashRemoveFlags "$1")")
shift 1
;;
---docker_image_id)
VIASH_MODE='docker_image_id'
shift 1
;;
---debug)
VIASH_MODE='debug'
shift 1
@@ -708,6 +734,10 @@ if [[ "$VIASH_ENGINE_TYPE" == "docker" ]]; then
if [ "$VIASH_MODE" == "dockerfile" ]; then
ViashDockerfile "$VIASH_ENGINE_ID"
exit 0
elif [ "$VIASH_MODE" == "docker_image_id" ]; then
echo "$VIASH_DOCKER_IMAGE_ID"
exit 0
# enter docker container
elif [[ "$VIASH_MODE" == "debug" ]]; then

View File

@@ -144,15 +144,15 @@ build_info:
engine: "docker|native"
output: "target/executable/busco/busco_list_datasets"
executable: "target/executable/busco/busco_list_datasets/busco_list_datasets"
viash_version: "0.9.0-RC6"
git_commit: "766ab6c9c3059004c7c3f205621909b2d8b0b26d"
viash_version: "0.9.0-RC7"
git_commit: "2b29a47575db9dbdff8448b287925c25d9a8b01d"
git_remote: "https://github.com/viash-hub/biobox"
package_config:
name: "biobox"
version: "main"
description: "A collection of bioinformatics tools for working with sequence data.\n"
info: null
viash_version: "0.9.0-RC6"
viash_version: "0.9.0-RC7"
source: "src"
target: "target"
config_mods:

View File

@@ -2,7 +2,7 @@
# busco_list_datasets main
#
# This wrapper script is auto-generated by viash 0.9.0-RC6 and is thus a
# This wrapper script is auto-generated by viash 0.9.0-RC7 and is thus a
# derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
# Data Intuitive.
#
@@ -57,24 +57,24 @@ function ViashRemoveFlags {
# $1 : Should always be set to ${BASH_SOURCE[0]}
# returns : The absolute path of the bash file
function ViashSourceDir {
SOURCE="$1"
while [ -h "$SOURCE" ]; do
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
local source="$1"
while [ -h "$source" ]; do
local dir="$( cd -P "$( dirname "$source" )" >/dev/null 2>&1 && pwd )"
source="$(readlink "$source")"
[[ $source != /* ]] && source="$dir/$source"
done
cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd
cd -P "$( dirname "$source" )" >/dev/null 2>&1 && pwd
}
# ViashFindTargetDir: return the path of the '.build.yaml' file, following symlinks
# usage : ViashFindTargetDir 'ScriptPath'
# $1 : The location from where to start the upward search
# returns : The absolute path of the '.build.yaml' file
function ViashFindTargetDir {
SOURCE="$1"
while [[ "$SOURCE" != "" && ! -e "$SOURCE/.build.yaml" ]]; do
SOURCE=${SOURCE%/*}
local source="$1"
while [[ "$source" != "" && ! -e "$source/.build.yaml" ]]; do
source=${source%/*}
done
echo $SOURCE
echo $source
}
# see https://en.wikipedia.org/wiki/Syslog#Severity_level
VIASH_LOGCODE_EMERGENCY=0
@@ -205,9 +205,9 @@ function ViashDockerInstallationCheck {
fi
ViashDebug "Checking whether the Docker daemon is running"
save=$-; set +e
docker_version=$(docker version --format '{{.Client.APIVersion}}' 2> /dev/null)
out=$?
local save=$-; set +e
local docker_version=$(docker version --format '{{.Client.APIVersion}}' 2> /dev/null)
local out=$?
[[ $save =~ e ]] && set -e
if [ $out -ne 0 ]; then
ViashCritical "Docker daemon does not seem to be running. Try one of the following:"
@@ -259,9 +259,9 @@ function ViashDockerPull {
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
docker pull $1 && return 0 || return 1
else
save=$-; set +e
local save=$-; set +e
docker pull $1 2> /dev/null > /dev/null
out=$?
local out=$?
[[ $save =~ e ]] && set -e
if [ $out -ne 0 ]; then
ViashWarning "Could not pull from '$1'. Docker image doesn't exist or is not accessible."
@@ -281,7 +281,8 @@ function ViashDockerPull {
# echo $? # returns '1'
function ViashDockerPush {
ViashNotice "Pushing image to '$1'"
save=$-; set +e
local save=$-; set +e
local out
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
docker push $1
out=$?
@@ -305,9 +306,9 @@ function ViashDockerPush {
# examples:
# ViashDockerPullElseBuild mynewcomponent
function ViashDockerPullElseBuild {
save=$-; set +e
local save=$-; set +e
ViashDockerPull $1
out=$?
local out=$?
[[ $save =~ e ]] && set -e
if [ $out -ne 0 ]; then
ViashDockerBuild $@
@@ -464,9 +465,9 @@ RUN busco --version | sed 's/BUSCO\s\(.*\)/busco: "\1"/' > /var/software_version
LABEL org.opencontainers.image.authors="Dorien Roosen"
LABEL org.opencontainers.image.description="Companion container for running component busco busco_list_datasets"
LABEL org.opencontainers.image.created="2024-08-21T11:35:59Z"
LABEL org.opencontainers.image.created="2024-09-02T13:02:47Z"
LABEL org.opencontainers.image.source="https://gitlab.com/ezlab/busco"
LABEL org.opencontainers.image.revision="766ab6c9c3059004c7c3f205621909b2d8b0b26d"
LABEL org.opencontainers.image.revision="2b29a47575db9dbdff8448b287925c25d9a8b01d"
LABEL org.opencontainers.image.version="main"
VIASHDOCKER
@@ -493,6 +494,9 @@ function ViashDockerBuildArgs {
# ViashAbsolutePath /foo/bar/.. # returns /foo
function ViashAbsolutePath {
local thePath
local parr
local outp
local len
if [[ ! "$1" =~ ^/ ]]; then
thePath="$PWD/$1"
else
@@ -523,14 +527,17 @@ function ViashAbsolutePath {
)
}
# ViashDockerAutodetectMount: auto configuring docker mounts from parameters
# $1 : The parameter value
# returns : New parameter
# $VIASH_DIRECTORY_MOUNTS : Added another parameter to be passed to docker
# $1 : The parameter value
# returns : New parameter
# $VIASH_DIRECTORY_MOUNTS : Added another parameter to be passed to docker
# $VIASH_DOCKER_AUTOMOUNT_PREFIX : The prefix to be used for the automounts
# examples:
# ViashDockerAutodetectMount /path/to/bar # returns '/viash_automount/path/to/bar'
# ViashDockerAutodetectMountArg /path/to/bar # returns '--volume="/path/to:/viash_automount/path/to"'
function ViashDockerAutodetectMount {
abs_path=$(ViashAbsolutePath "$1")
local abs_path=$(ViashAbsolutePath "$1")
local mount_source
local base_name
if [ -d "$abs_path" ]; then
mount_source="$abs_path"
base_name=""
@@ -538,7 +545,7 @@ function ViashDockerAutodetectMount {
mount_source=`dirname "$abs_path"`
base_name=`basename "$abs_path"`
fi
mount_target="/viash_automount$mount_source"
local mount_target="$VIASH_DOCKER_AUTOMOUNT_PREFIX$mount_source"
if [ -z "$base_name" ]; then
echo "$mount_target"
else
@@ -546,7 +553,9 @@ function ViashDockerAutodetectMount {
fi
}
function ViashDockerAutodetectMountArg {
abs_path=$(ViashAbsolutePath "$1")
local abs_path=$(ViashAbsolutePath "$1")
local mount_source
local base_name
if [ -d "$abs_path" ]; then
mount_source="$abs_path"
base_name=""
@@ -554,17 +563,22 @@ function ViashDockerAutodetectMountArg {
mount_source=`dirname "$abs_path"`
base_name=`basename "$abs_path"`
fi
mount_target="/viash_automount$mount_source"
local mount_target="$VIASH_DOCKER_AUTOMOUNT_PREFIX$mount_source"
ViashDebug "ViashDockerAutodetectMountArg $1 -> $mount_source -> $mount_target"
echo "--volume=\"$mount_source:$mount_target\""
}
function ViashDockerStripAutomount {
abs_path=$(ViashAbsolutePath "$1")
echo "${abs_path#/viash_automount}"
local abs_path=$(ViashAbsolutePath "$1")
echo "${abs_path#$VIASH_DOCKER_AUTOMOUNT_PREFIX}"
}
# initialise variables
VIASH_DIRECTORY_MOUNTS=()
# configure default docker automount prefix if it is unset
if [ -z "${VIASH_DOCKER_AUTOMOUNT_PREFIX+x}" ]; then
VIASH_DOCKER_AUTOMOUNT_PREFIX="/viash_automount"
fi
# initialise docker variables
VIASH_DOCKER_RUN_ARGS=(-i --rm)
@@ -632,6 +646,18 @@ while [[ $# -gt 0 ]]; do
VIASH_MODE='dockerfile'
shift 1
;;
---docker_run_args)
VIASH_DOCKER_RUN_ARGS+=("$2")
shift 2
;;
---docker_run_args=*)
VIASH_DOCKER_RUN_ARGS+=("$(ViashRemoveFlags "$1")")
shift 1
;;
---docker_image_id)
VIASH_MODE='docker_image_id'
shift 1
;;
---debug)
VIASH_MODE='debug'
shift 1
@@ -693,6 +719,10 @@ if [[ "$VIASH_ENGINE_TYPE" == "docker" ]]; then
if [ "$VIASH_MODE" == "dockerfile" ]; then
ViashDockerfile "$VIASH_ENGINE_ID"
exit 0
elif [ "$VIASH_MODE" == "docker_image_id" ]; then
echo "$VIASH_DOCKER_IMAGE_ID"
exit 0
# enter docker container
elif [[ "$VIASH_MODE" == "debug" ]]; then

View File

@@ -422,15 +422,15 @@ build_info:
engine: "docker|native"
output: "target/executable/busco/busco_run"
executable: "target/executable/busco/busco_run/busco_run"
viash_version: "0.9.0-RC6"
git_commit: "766ab6c9c3059004c7c3f205621909b2d8b0b26d"
viash_version: "0.9.0-RC7"
git_commit: "2b29a47575db9dbdff8448b287925c25d9a8b01d"
git_remote: "https://github.com/viash-hub/biobox"
package_config:
name: "biobox"
version: "main"
description: "A collection of bioinformatics tools for working with sequence data.\n"
info: null
viash_version: "0.9.0-RC6"
viash_version: "0.9.0-RC7"
source: "src"
target: "target"
config_mods:

View File

@@ -2,7 +2,7 @@
# busco_run main
#
# This wrapper script is auto-generated by viash 0.9.0-RC6 and is thus a
# This wrapper script is auto-generated by viash 0.9.0-RC7 and is thus a
# derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
# Data Intuitive.
#
@@ -57,24 +57,24 @@ function ViashRemoveFlags {
# $1 : Should always be set to ${BASH_SOURCE[0]}
# returns : The absolute path of the bash file
function ViashSourceDir {
SOURCE="$1"
while [ -h "$SOURCE" ]; do
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
local source="$1"
while [ -h "$source" ]; do
local dir="$( cd -P "$( dirname "$source" )" >/dev/null 2>&1 && pwd )"
source="$(readlink "$source")"
[[ $source != /* ]] && source="$dir/$source"
done
cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd
cd -P "$( dirname "$source" )" >/dev/null 2>&1 && pwd
}
# ViashFindTargetDir: return the path of the '.build.yaml' file, following symlinks
# usage : ViashFindTargetDir 'ScriptPath'
# $1 : The location from where to start the upward search
# returns : The absolute path of the '.build.yaml' file
function ViashFindTargetDir {
SOURCE="$1"
while [[ "$SOURCE" != "" && ! -e "$SOURCE/.build.yaml" ]]; do
SOURCE=${SOURCE%/*}
local source="$1"
while [[ "$source" != "" && ! -e "$source/.build.yaml" ]]; do
source=${source%/*}
done
echo $SOURCE
echo $source
}
# see https://en.wikipedia.org/wiki/Syslog#Severity_level
VIASH_LOGCODE_EMERGENCY=0
@@ -372,9 +372,9 @@ function ViashDockerInstallationCheck {
fi
ViashDebug "Checking whether the Docker daemon is running"
save=$-; set +e
docker_version=$(docker version --format '{{.Client.APIVersion}}' 2> /dev/null)
out=$?
local save=$-; set +e
local docker_version=$(docker version --format '{{.Client.APIVersion}}' 2> /dev/null)
local out=$?
[[ $save =~ e ]] && set -e
if [ $out -ne 0 ]; then
ViashCritical "Docker daemon does not seem to be running. Try one of the following:"
@@ -426,9 +426,9 @@ function ViashDockerPull {
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
docker pull $1 && return 0 || return 1
else
save=$-; set +e
local save=$-; set +e
docker pull $1 2> /dev/null > /dev/null
out=$?
local out=$?
[[ $save =~ e ]] && set -e
if [ $out -ne 0 ]; then
ViashWarning "Could not pull from '$1'. Docker image doesn't exist or is not accessible."
@@ -448,7 +448,8 @@ function ViashDockerPull {
# echo $? # returns '1'
function ViashDockerPush {
ViashNotice "Pushing image to '$1'"
save=$-; set +e
local save=$-; set +e
local out
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
docker push $1
out=$?
@@ -472,9 +473,9 @@ function ViashDockerPush {
# examples:
# ViashDockerPullElseBuild mynewcomponent
function ViashDockerPullElseBuild {
save=$-; set +e
local save=$-; set +e
ViashDockerPull $1
out=$?
local out=$?
[[ $save =~ e ]] && set -e
if [ $out -ne 0 ]; then
ViashDockerBuild $@
@@ -631,9 +632,9 @@ RUN busco --version | sed 's/BUSCO\s\(.*\)/busco: "\1"/' > /var/software_version
LABEL org.opencontainers.image.authors="Dorien Roosen"
LABEL org.opencontainers.image.description="Companion container for running component busco busco_run"
LABEL org.opencontainers.image.created="2024-08-21T11:35:59Z"
LABEL org.opencontainers.image.created="2024-09-02T13:02:48Z"
LABEL org.opencontainers.image.source="https://gitlab.com/ezlab/busco"
LABEL org.opencontainers.image.revision="766ab6c9c3059004c7c3f205621909b2d8b0b26d"
LABEL org.opencontainers.image.revision="2b29a47575db9dbdff8448b287925c25d9a8b01d"
LABEL org.opencontainers.image.version="main"
VIASHDOCKER
@@ -660,6 +661,9 @@ function ViashDockerBuildArgs {
# ViashAbsolutePath /foo/bar/.. # returns /foo
function ViashAbsolutePath {
local thePath
local parr
local outp
local len
if [[ ! "$1" =~ ^/ ]]; then
thePath="$PWD/$1"
else
@@ -690,14 +694,17 @@ function ViashAbsolutePath {
)
}
# ViashDockerAutodetectMount: auto configuring docker mounts from parameters
# $1 : The parameter value
# returns : New parameter
# $VIASH_DIRECTORY_MOUNTS : Added another parameter to be passed to docker
# $1 : The parameter value
# returns : New parameter
# $VIASH_DIRECTORY_MOUNTS : Added another parameter to be passed to docker
# $VIASH_DOCKER_AUTOMOUNT_PREFIX : The prefix to be used for the automounts
# examples:
# ViashDockerAutodetectMount /path/to/bar # returns '/viash_automount/path/to/bar'
# ViashDockerAutodetectMountArg /path/to/bar # returns '--volume="/path/to:/viash_automount/path/to"'
function ViashDockerAutodetectMount {
abs_path=$(ViashAbsolutePath "$1")
local abs_path=$(ViashAbsolutePath "$1")
local mount_source
local base_name
if [ -d "$abs_path" ]; then
mount_source="$abs_path"
base_name=""
@@ -705,7 +712,7 @@ function ViashDockerAutodetectMount {
mount_source=`dirname "$abs_path"`
base_name=`basename "$abs_path"`
fi
mount_target="/viash_automount$mount_source"
local mount_target="$VIASH_DOCKER_AUTOMOUNT_PREFIX$mount_source"
if [ -z "$base_name" ]; then
echo "$mount_target"
else
@@ -713,7 +720,9 @@ function ViashDockerAutodetectMount {
fi
}
function ViashDockerAutodetectMountArg {
abs_path=$(ViashAbsolutePath "$1")
local abs_path=$(ViashAbsolutePath "$1")
local mount_source
local base_name
if [ -d "$abs_path" ]; then
mount_source="$abs_path"
base_name=""
@@ -721,17 +730,22 @@ function ViashDockerAutodetectMountArg {
mount_source=`dirname "$abs_path"`
base_name=`basename "$abs_path"`
fi
mount_target="/viash_automount$mount_source"
local mount_target="$VIASH_DOCKER_AUTOMOUNT_PREFIX$mount_source"
ViashDebug "ViashDockerAutodetectMountArg $1 -> $mount_source -> $mount_target"
echo "--volume=\"$mount_source:$mount_target\""
}
function ViashDockerStripAutomount {
abs_path=$(ViashAbsolutePath "$1")
echo "${abs_path#/viash_automount}"
local abs_path=$(ViashAbsolutePath "$1")
echo "${abs_path#$VIASH_DOCKER_AUTOMOUNT_PREFIX}"
}
# initialise variables
VIASH_DIRECTORY_MOUNTS=()
# configure default docker automount prefix if it is unset
if [ -z "${VIASH_DOCKER_AUTOMOUNT_PREFIX+x}" ]; then
VIASH_DOCKER_AUTOMOUNT_PREFIX="/viash_automount"
fi
# initialise docker variables
VIASH_DOCKER_RUN_ARGS=(-i --rm)
@@ -1046,6 +1060,18 @@ while [[ $# -gt 0 ]]; do
VIASH_MODE='dockerfile'
shift 1
;;
---docker_run_args)
VIASH_DOCKER_RUN_ARGS+=("$2")
shift 2
;;
---docker_run_args=*)
VIASH_DOCKER_RUN_ARGS+=("$(ViashRemoveFlags "$1")")
shift 1
;;
---docker_image_id)
VIASH_MODE='docker_image_id'
shift 1
;;
---debug)
VIASH_MODE='debug'
shift 1
@@ -1107,6 +1133,10 @@ if [[ "$VIASH_ENGINE_TYPE" == "docker" ]]; then
if [ "$VIASH_MODE" == "dockerfile" ]; then
ViashDockerfile "$VIASH_ENGINE_ID"
exit 0
elif [ "$VIASH_MODE" == "docker_image_id" ]; then
echo "$VIASH_DOCKER_IMAGE_ID"
exit 0
# enter docker container
elif [[ "$VIASH_MODE" == "debug" ]]; then