File size: 626 Bytes
45eb0e0 626b974 b4b51c9 ef8e2eb 45eb0e0 626b974 45eb0e0 b4b51c9 626b974 45eb0e0 626b974 27c51d5 45eb0e0 27c51d5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# Use a lightweight Python image
FROM python:3.10-slim
# Install necessary system dependencies
RUN apt-get update && apt-get install -y \
libgl1-mesa-glx \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/* # Clean up package lists to reduce image size
# Set the working directory inside the container
WORKDIR /app
# Copy and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the entire project
COPY . .
# Expose the correct port for Hugging Face Spaces
EXPOSE 7860
# Run FastAPI using Uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |