Blablablab/rag-evaluation
0
1#!/bin/bash2set -e3 4# Configuration5CONFIG_FILE="${POTATO_CONFIG:-config.yaml}"6PORT="${PORT:-7860}"7WORKERS="${GUNICORN_WORKERS:-2}"8THREADS="${GUNICORN_THREADS:-4}"9TIMEOUT="${GUNICORN_TIMEOUT:-120}"10 11echo "Starting Potato Demo Space..."12echo " Config: ${CONFIG_FILE}"13echo " Port: ${PORT}"14echo " Workers: ${WORKERS}"15 16# Validate config exists17if [ ! -f "${CONFIG_FILE}" ]; then18 echo "ERROR: Config file not found: ${CONFIG_FILE}"19 exit 120fi21 22# Start with gunicorn using the factory pattern23exec gunicorn \24 --bind "0.0.0.0:${PORT}" \25 --workers "${WORKERS}" \26 --threads "${THREADS}" \27 --timeout "${TIMEOUT}" \28 --access-logfile - \29 --error-logfile - \30 "potato.flask_server:create_app('${CONFIG_FILE}')"31 