Create Dockerfile
Browse files1234567891011121314151617181920212223# Use official Python imageFROM python:3.11-slim
# Set working directoryWORKDIR /app
# Copy requirements first (caches dependencies)COPY requirements.txt .
# Install dependenciesRUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the appCOPY . .
# Expose port (HF Spaces or local)EXPOSE 7860
# Set environment variable for Uvicorn to run in productionENV UVICORN_CMD="uvicorn app:app --host 0.0.0.0 --port 7860"
# Run the FastAPI appCMD ["sh", "-c", "$UVICORN_CMD"]DockerfileAdded+23