Spaces:
Sleeping
Sleeping
File size: 757 Bytes
85f8047 197fe55 7ea6abe 197fe55 7ea6abe 85f8047 197fe55 85f8047 197fe55 7ea6abe 197fe55 7ea6abe 197fe55 7ea6abe 197fe55 7ea6abe 197fe55 7ea6abe | 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 | # Start with a lightweight Python version
FROM python:3.9-slim
# Set the working directory
WORKDIR /code
# 1. Install System Dependencies
# FIX: Removed 'libgl1-mesa-glx' (obsolete). Added 'libgl1' and 'libglx-mesa0'.
RUN apt-get update && apt-get install -y \
libgl1 \
libglx-mesa0 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# 2. Copy the requirements file
COPY ./requirements.txt /code/requirements.txt
# 3. Install Python libraries
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# 4. Copy your code and model
COPY . .
# 5. Create a folder for uploads just in case
RUN mkdir -p /code/uploads && chmod 777 /code/uploads
# 6. Start the server
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |