Skip to content

Commit 5a6e220

Browse files
committed
Add exec & fix formatting in sagemaker-entrypoint.sh
Use `exec` so that the process runs with PID 1, allowing it to receive signals directly; and so on, to be gracefully shut down
1 parent ea5fe86 commit 5a6e220

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sagemaker-entrypoint.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
22

33
if [[ -z "${HF_MODEL_ID}" ]]; then
4-
echo "HF_MODEL_ID must be set"
5-
exit 1
4+
echo "HF_MODEL_ID must be set"
5+
exit 1
66
fi
77
export MODEL_ID="${HF_MODEL_ID}"
88

99
if [[ -n "${HF_MODEL_REVISION}" ]]; then
10-
export REVISION="${HF_MODEL_REVISION}"
10+
export REVISION="${HF_MODEL_REVISION}"
1111
fi
1212

13-
text-embeddings-router --port 8080 --json-output
13+
exec text-embeddings-router --port 8080 --json-output

0 commit comments

Comments
 (0)