FROM python:3.11-slim WORKDIR /app # Install system dependencies for psycopg2 RUN apt-get update && apt-get install -y \ libpq-dev \ gcc \ && rm -rf /var/lib/apt/lists/* COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy everything from current directory to /app # Since we are in server/ directory when building, we copy server content COPY . . # Expose port EXPOSE 7860 # Set Python Path to include /app so "from models" etc work correctly ENV PYTHONPATH=/app CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]