File size: 802 Bytes
b9186b3 d2dd6b3 b9186b3 d2dd6b3 b9186b3 9c7e028 37cc825 b9186b3 cd9492f 2d6b739 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# Use a slim Python 3.10 base image
FROM python:3.10-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
# Set the working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Copy and install Python dependencies
COPY requirements.txt .
RUN pip install --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy the backend and frontend source code
COPY Backend/ Backend
COPY Frontend/ Frontend
# Expose FastAPI app on port 7860 (required by Hugging Face)
CMD ["uvicorn", "Backend.app:app", "--host", "0.0.0.0", "--port", "7860", "--limit-max-requests", "10000000"]
|