Spaces:
Runtime error
Runtime error
12345678910111213141516171819202122232425262728293031323334353637# Use Python 3.9 slim image for better compatibility with HF SpacesFROM python:3.9-slim
# Set working directoryWORKDIR /app
# Set environment variablesENV PYTHONUNBUFFERED=1ENV FLASK_APP=app.pyENV FLASK_ENV=productionENV PORT=7860
# Install system dependenciesRUN apt-get update && apt-get install -y \ gcc \ g++ \ && rm -rf /var/lib/apt/lists/*
# Copy requirements first for better cachingCOPY requirements.txt .
# Install Python dependenciesRUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir -r requirements.txt
# Copy application codeCOPY . .
# Create a non-root user (recommended for HF Spaces)RUN useradd -m -u 1000 userUSER user
# Expose the port that HF Spaces expectsEXPOSE 7860
# Command to run the Flask appCMD ["python", "-m", "flask", "run", "--host=0.0.0.0", "--port=7860"]DockerfileAdded+37