fix: update Dockerfile

This commit is contained in:
Tadashi
2025-01-03 14:26:04 +07:00
parent 14b75e23bd
commit 84fa375ef7
2 changed files with 3 additions and 3 deletions

View File

@@ -35,6 +35,7 @@ RUN bash scripts/download_pdfjs.sh $PDFJS_PREBUILT_DIR
# Copy contents # Copy contents
COPY . /app COPY . /app
COPY launch.sh /app/launch.sh
COPY .env.example /app/.env COPY .env.example /app/.env
# Install pip packages # Install pip packages

5
launch.sh Normal file → Executable file
View File

@@ -2,7 +2,7 @@
if [ -z "$GRADIO_SERVER_NAME" ]; then if [ -z "$GRADIO_SERVER_NAME" ]; then
export GRADIO_SERVER_NAME="0.0.0.0" export GRADIO_SERVER_NAME="0.0.0.0"
if fi
if [ -z "$GRADIO_SERVER_PORT" ]; then if [ -z "$GRADIO_SERVER_PORT" ]; then
export GRADIO_SERVER_PORT="7860" export GRADIO_SERVER_PORT="7860"
fi fi
@@ -11,8 +11,7 @@ fi
if [ "$KH_DEMO_MODE" = "true" ]; then if [ "$KH_DEMO_MODE" = "true" ]; then
echo "KH_DEMO_MODE is true. Launching in demo mode..." echo "KH_DEMO_MODE is true. Launching in demo mode..."
# Command to launch in demo mode # Command to launch in demo mode
GR_FILE_ROOT_PATH="/app" KH_FEATURE_USER_MANAGEMENT=false USE_LIGHTRAG=false \ GR_FILE_ROOT_PATH="/app" KH_FEATURE_USER_MANAGEMENT=false USE_LIGHTRAG=false uvicorn sso_app_demo:app --host "$GRADIO_SERVER_NAME" --port "$GRADIO_SERVER_PORT"
uvicorn sso_app_demo:app --host "$GRADIO_SERVER_NAME" --port "$GRADIO_SERVER_PORT"
else else
python app.py python app.py
fi fi