Spaces:
Runtime error
Runtime error
Update docker_start.sh
Browse files- docker_start.sh +8 -10
docker_start.sh
CHANGED
@@ -3,21 +3,19 @@
|
|
3 |
# Fail if any of the commands below fail.
|
4 |
set -e
|
5 |
|
6 |
-
lilac hf-docker-start
|
7 |
-
gunicorn lilac.server:app \
|
8 |
-
--bind 0.0.0.0:5432 \
|
9 |
-
--preload -k uvicorn.workers.UvicornWorker \
|
10 |
-
--timeout 120
|
11 |
-
|
12 |
-
#!/bin/bash
|
13 |
-
|
14 |
# Check if the HUGGINGFACE_TOKEN is set at runtime
|
15 |
echo "Checking if HUGGINGFACE_TOKEN is set at runtime..."
|
16 |
if [ -z "${HUGGINGFACE_TOKEN}" ]; then
|
17 |
echo "HUGGINGFACE_TOKEN is not set at runtime."
|
|
|
|
|
18 |
else
|
19 |
echo "HUGGINGFACE_TOKEN is set at runtime."
|
20 |
fi
|
21 |
|
22 |
-
#
|
23 |
-
|
|
|
|
|
|
|
|
|
|
3 |
# Fail if any of the commands below fail.
|
4 |
set -e
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
# Check if the HUGGINGFACE_TOKEN is set at runtime
|
7 |
echo "Checking if HUGGINGFACE_TOKEN is set at runtime..."
|
8 |
if [ -z "${HUGGINGFACE_TOKEN}" ]; then
|
9 |
echo "HUGGINGFACE_TOKEN is not set at runtime."
|
10 |
+
# Exit if no token is found, or handle the case appropriately.
|
11 |
+
exit 1
|
12 |
else
|
13 |
echo "HUGGINGFACE_TOKEN is set at runtime."
|
14 |
fi
|
15 |
|
16 |
+
# Your existing commands to start the server
|
17 |
+
lilac hf-docker-start
|
18 |
+
gunicorn lilac.server:app \
|
19 |
+
--bind 0.0.0.0:5432 \
|
20 |
+
--preload -k uvicorn.workers.UvicornWorker \
|
21 |
+
--timeout 120
|