test / Dockerfile
ismailelghazi
zbi
05a0510
raw
history blame contribute delete
511 Bytes
# 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"]