File size: 580 Bytes
15b9cac
 
 
 
 
bdc38c0
 
 
 
ead3545
 
bdc38c0
 
 
 
ead3545
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

# Fail if any of the commands below fail.
set -e

# Check if the HUGGINGFACE_TOKEN is set at runtime
echo "Checking if HUGGINGFACE_TOKEN is set at runtime..."
if [ -z "${HUGGINGFACE_TOKEN}" ]; then
    echo "HUGGINGFACE_TOKEN is not set at runtime."
    # Exit if no token is found, or handle the case appropriately.
    exit 1
else
    echo "HUGGINGFACE_TOKEN is set at runtime."
fi

# Your existing commands to start the server
lilac hf-docker-start
gunicorn lilac.server:app \
  --bind 0.0.0.0:5432 \
  --preload -k uvicorn.workers.UvicornWorker \
  --timeout 120