-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathentrypoint.sh
More file actions
executable file
·37 lines (34 loc) · 895 Bytes
/
entrypoint.sh
File metadata and controls
executable file
·37 lines (34 loc) · 895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env bash
set -euo pipefail
# Ensure at least one argument is provided
if [ "$#" -eq 0 ]; then
echo "Usage: $0 {uniref|uniprot|test|xml_split} [args...]"
exit 1
fi
cmd="$1"
shift
case "$cmd" in
xml_split)
# Run the xml_file_splitter app
exec /usr/bin/tini -- xml_file_splitter "$@"
;;
uniref)
# Run the uniref pipeline with any additional arguments via tini
exec /usr/bin/tini -- uv run --no-sync uniref_pipeline "$@"
;;
uniprot)
# Run the uniprot pipeline with any additional arguments via tini
exec /usr/bin/tini -- uv run --no-sync uniprot_pipeline "$@"
;;
test)
# run the tests
exec /usr/bin/tini -- uv run --no-sync pytest -m "not requires_spark"
;;
bash)
exec /usr/bin/tini -- /bin/bash
;;
*)
echo "Error: unknown command '$cmd'; valid commands are 'uniref' or 'uniprot'." >&2
exit 1
;;
esac