Spaces:
Sleeping
Sleeping
File size: 536 Bytes
fcf2131 980f609 fcf2131 980f609 fcf2131 980f609 fcf2131 980f609 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # Use a lightweight Python image
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Install OS-level dependencies
RUN apt-get update && apt-get install -y libgl1 libglib2.0-0 && rm -rf /var/lib/apt/lists/*
# Copy your project files into the container
COPY . .
# Upgrade pip and install Python dependencies
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Expose the port Hugging Face Spaces expects
EXPOSE 7860
# Run the FastAPI app
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|