Spaces:
Sleeping
Sleeping
| FROM python:3.10-slim | |
| WORKDIR /mannequin_to_model | |
| COPY . /mannequin_to_model | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1-mesa-glx \ | |
| ffmpeg \ | |
| libsm6 \ | |
| libxext6 \ | |
| build-essential \ | |
| git \ | |
| && apt-get clean | |
| RUN pip install --no-cache-dir --upgrade pip==23.0 | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Create necessary directories and set permissions | |
| RUN mkdir -p /tmp/.config/matplotlib /tmp/.insightface/models /tmp/.cache/gdown && \ | |
| chmod -R 777 /tmp && \ | |
| chmod -R 777 /mannequin_to_model | |
| # Set environment variables | |
| ENV MPLCONFIGDIR=/tmp/.config/matplotlib | |
| ENV XDG_CACHE_HOME=/tmp/.cache | |
| EXPOSE 7860 | |
| CMD ["python", "main.py"] |