Update entrypoint.sh
Browse files- entrypoint.sh +14 -1
entrypoint.sh
CHANGED
|
@@ -1,3 +1,16 @@
|
|
| 1 |
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
/app/watch_config.sh &
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
|
| 4 |
+
CONFIG_PATH="/app/config.yaml"
|
| 5 |
+
|
| 6 |
+
# Start the config watcher in the background (it pulls the config on first run)
|
| 7 |
/app/watch_config.sh &
|
| 8 |
+
|
| 9 |
+
# Wait for the config file to be written before starting LiteLLM
|
| 10 |
+
echo "[entrypoint] Waiting for ${CONFIG_PATH} to be available..."
|
| 11 |
+
until [ -f "${CONFIG_PATH}" ]; do
|
| 12 |
+
sleep 1
|
| 13 |
+
done
|
| 14 |
+
echo "[entrypoint] Config found, starting LiteLLM..."
|
| 15 |
+
|
| 16 |
+
exec litellm --config "${CONFIG_PATH}" --port 7860 --num_workers 2
|