Spaces:
Running
Running
File size: 667 Bytes
3e805ab 0a70bdc ae5af92 0a70bdc ae5af92 3e805ab ae5af92 3e805ab ae5af92 3e805ab | 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 | # Use an official Python runtime
FROM python:3.10
# Set the working directory
WORKDIR /app
# --- UPDATED: Use libgl1 instead of the obsolete libgl1-mesa-glx ---
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install them
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the backend code
COPY . .
# Create the temp directory and give it permission
RUN mkdir -p temp_uploads
RUN chmod -R 777 temp_uploads
# Hugging Face port
EXPOSE 7860
# Start the FastAPI server
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |