Spaces:
Runtime error
Runtime error
File size: 511 Bytes
05a0510 21f81f9 ce83c09 21f81f9 05a0510 21f81f9 05a0510 136ec11 21f81f9 05a0510 136ec11 21f81f9 05a0510 ce83c09 21f81f9 136ec11 ce83c09 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # Base Python image
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install system dependencies (needed for psycopg2)
RUN apt-get update && apt-get install -y libpq-dev gcc && rm -rf /var/lib/apt/lists/*
# Copy requirements and install Python packages
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the app code
COPY . .
# Expose Hugging Face default port
EXPOSE 7860
# Run FastAPI app
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|