Spaces:
Sleeping
Sleeping
Download Dockerfile from castecabas/Recicler: direct link, hf CLI and curl.
- Browser
- Download file 878 Bytes
-
https://huggingface.co/spaces/castecabas/Recicler/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/castecabas/Recicler/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/castecabas/Recicler/resolve/main/Dockerfile
878 Bytes
| FROM python:3.9-slim | |
| # Actualiza e instala dependencias | |
| RUN apt-get update && apt-get install -y \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender1 \ | |
| libgl1-mesa-glx \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Configura directorios temporales | |
| ENV YOLO_CONFIG_DIR=/tmp/yolo_config | |
| ENV MPLCONFIGDIR=/tmp/matplotlib | |
| ENV ULTRALYTICS_HOME=/tmp/ultralytics | |
| # Crea directorios necesarios | |
| RUN mkdir -p /tmp/yolo_config /tmp/matplotlib /tmp/ultralytics && \ | |
| chmod -R 777 /tmp/yolo_config /tmp/matplotlib /tmp/ultralytics | |
| WORKDIR /app | |
| # Instala dependencias | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copia el código | |
| COPY . . | |
| # Puerto para Hugging Face Spaces | |
| EXPOSE 7860 | |
| # Comando para ejecutar | |
| CMD ["gunicorn", "--timeout", "300", "--workers", "1", "--bind", "0.0.0.0:7860", "app:app"] | |