FROM python:3.9-slim WORKDIR /app # Install git only - removing OpenGL dependencies to avoid build issues RUN apt-get update && apt-get install -y \ git \ && rm -rf /var/lib/apt/lists/* # Copy requirements and install Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application code COPY . . # Set environment variables for API-based image generation and trimesh-only operation ENV HF_HOME=/tmp/huggingface ENV TRANSFORMERS_CACHE=/tmp/transformers_cache ENV HF_DATASETS_CACHE=/tmp/huggingface_datasets ENV TORCH_HOME=/tmp/torch ENV HUGGINGFACE_API_TOKEN="" ENV FORCE_TRIMESH=1 # Note: Using trimesh-only mode for reliable deployment without OpenGL dependencies EXPOSE 7860 CMD ["python", "app.py"]