text-to-3d-backend / Dockerfile
aniket47's picture
Remove Open3D dependencies and simplify for HF Spaces deployment - Use trimesh-only mode with FORCE_TRIMESH flag - Remove OpenGL system dependencies - Simplify requirements.txt and Dockerfile
9101902
raw
history blame contribute delete
767 Bytes
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"]