-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial version (part two) incorporating review suggestions from kdj
- Loading branch information
1 parent
a24a446
commit eeaa2d0
Showing
6 changed files
with
143 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
-----BEGIN PGP PUBLIC KEY BLOCK----- | ||
|
||
mI0ESXjaGwEEAMA26F3+mnRW8uRqASMsEa5EsmgvUpLD7EKpC7903OpiMGSvZ2sE | ||
34g7W6nUQY0R//AZS2iW4ZXfvdhQTQuuPlHM6Q3iUAt+nyXcf9xBlscs8Gm722u4 | ||
jAtFtBS4BMQRhRRfWTHwJIOM6OpGIccjPe8pQfIeoRxkKJxlehzw2mU1ABEBAAG0 | ||
KExhdW5jaHBhZCBQUEEgZm9yIFVidW50dSBHaXQgTWFpbnRhaW5lcnOItgQTAQIA | ||
IAUCSXjaGwIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEKFxXYjh3x8k/zMD | ||
/RKBMjavvFl71YBazSOGl2YfSsZiR/ANsby3+rUaULb8uxzCHXAQnlH5vdtLSPry | ||
aLBvzCU8C3C02qNT8jRacU2752zsCkCi1SLRSOXdI/ATJHza5aTvYV93rTITBhU4 | ||
sJQeK9RW0CtaDRAxJsn/Dr6J3lL/c9m9cT5fFpxOIsF4 | ||
=33dX | ||
-----END PGP PUBLIC KEY BLOCK----- | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
bcftools | ||
samtools | ||
htsfile | ||
tabix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
#!/bin/sh | ||
# | ||
# Copyright (C) 2023 Genome Research Ltd. All rights reserved. | ||
# | ||
|
@@ -17,8 +17,6 @@ | |
# | ||
# Author: Keith James <[email protected]> | ||
|
||
set -euo pipefail | ||
|
||
usage() { | ||
cat 1>&2 << EOF | ||
Install singularity proxy wrappers for the executables listed in a | ||
|
@@ -36,7 +34,7 @@ Usage: $0 | |
[-e] | ||
[-h] | ||
[-i <Docker image name>] | ||
[-m <JSON manifest path>] | ||
[-m <manifest path>] | ||
[-p <wrapper install prefix>] | ||
[-r <Docker registry name>] | ||
[-s] | ||
|
@@ -73,7 +71,7 @@ EOF | |
|
||
# Print an application manifest | ||
print_manifest() { | ||
jq . "$MANIFEST_PATH" | ||
cat "$MANIFEST_PATH" | ||
} | ||
|
||
# Write a bash script wrapping an application in a Docker container | ||
|
@@ -113,9 +111,9 @@ install_wrappers() { | |
install -d "$dir" | ||
cp "/usr/local/bin/$singularity_wrap_impl" "$PREFIX/bin" | ||
|
||
for exe in "${wrappers[@]}" ; do | ||
while IFS= read -r exe; do | ||
write_wrapper "$dir" "$exe" | ||
done | ||
done < "$MANIFEST_PATH" | ||
} | ||
|
||
DOCKER_REGISTRY=${DOCKER_REGISTRY:-ghcr.io} | ||
|
@@ -124,7 +122,7 @@ DOCKER_IMAGE=${DOCKER_IMAGE:-""} | |
DOCKER_TAG=${DOCKER_TAG:-latest} | ||
|
||
PREFIX=${PREFIX:-/opt/wtsi-npg} | ||
MANIFEST_PATH=${MANIFEST_PATH:-"$PREFIX/etc/manifest.json"} | ||
MANIFEST_PATH=${MANIFEST_PATH:-"$PREFIX/etc/manifest.txt"} | ||
|
||
singularity_wrap_impl="singularity-run-docker" | ||
|
||
|
@@ -171,19 +169,12 @@ done | |
|
||
shift $((OPTIND -1)) | ||
|
||
declare -a wrappers | ||
if [ ! -e "$MANIFEST_PATH" ] ; then | ||
echo -e "\nERROR:\n The manifest of executables at '$MANIFEST_PATH' does not exist" | ||
exit 4 | ||
fi | ||
|
||
|
||
|
||
|
||
|
||
wrappers=($(jq -j '.executable[] + " "' "$MANIFEST_PATH")) | ||
|
||
operation="$@" | ||
operation="$1" | ||
if [ -z "$operation" ] ; then | ||
usage | ||
echo -e "\nERROR:\n An operation argument is required" | ||
|