Spaces:
Sleeping
Sleeping
File size: 767 Bytes
2a7045c 9101902 6e0e6cc 2a7045c 6e0e6cc 2a7045c 9101902 091271a 11fb463 9101902 091271a 9101902 6e0e6cc 2a7045c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
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"] |