fix: use python server.py instead of gunicorn
Browse files123456789101112131415161718192021222324252627282930313233343536# Use Python latest stable slim image for a small footprintFROM python:3.11-slim# Set the working directory in the containerWORKDIR /app# Copy the requirements file first to leverage Docker build cacheCOPY requirements.txt .# Install system dependencies and Python packagesRUN apt-get update && apt-get install -y --no-install-recommends \build-essential \&& rm -rf /var/lib/apt/lists/* \&& pip install --no-cache-dir -r requirements.txt# Copy all project files into the containerCOPY . .# Expose port 5000 for the Flask applicationEXPOSE 5000<<<<<<< HEAD# Set default Flask environment variableENV FLASK_APP=app.py# Run the Flask applicationCMD ["flask", "run", "--host=0.0.0.0", "--port=5000"]=======# Environment variables (override at runtime)ENV API_BASE_URL="https://router.huggingface.co/v1" \MODEL_NAME="meta-llama/Meta-Llama-3-8B-Instruct" \HF_TOKEN=""# Run via gunicorn (production-grade)CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "1", "--timeout", "120", "server:app"]>>>>>>> round1-submission1234567891011121314151617181920FROM python:3.11-slimWORKDIR /appCOPY requirements.txt .RUN apt-get update && apt-get install -y --no-install-recommends \build-essential \&& rm -rf /var/lib/apt/lists/* \&& pip install --no-cache-dir -r requirements.txtCOPY . .EXPOSE 7860ENV API_BASE_URL="https://router.huggingface.co/v1" \MODEL_NAME="meta-llama/Meta-Llama-3-8B-Instruct" \HF_TOKEN=""CMD ["python", "server.py"]
Dockerfile+2-18