Flux / Dockerfile
sanch1txp's picture
Update Dockerfile
9a451d3 verified
Raw History Blame Contribute Delete
614 Bytes
# Use the official Python base image
FROM python:3.10-slim
# Install system dependencies (for image processing etc.)
RUN apt-get update && apt-get install -y \
libglib2.0-0 libsm6 libxext6 libxrender-dev && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /code
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Expose port 7860 for Hugging Face Space
EXPOSE 7860
# Hugging Face Spaces expect the app to run on port 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]