Download Dockerfile from Pingul/maps: direct link, hf CLI and curl.
- Browser
- Download file 742 Bytes
-
https://huggingface.co/spaces/Pingul/maps/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Pingul/maps/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Pingul/maps/resolve/main/Dockerfile
742 Bytes
| # Imagen base ligera con Python | |
| FROM python:3.10-slim | |
| # Evita que Python guarde .pyc y buffers | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| # Instalar dependencias del sistema necesarias para rasterio | |
| RUN apt-get update && apt-get install -y \ | |
| gdal-bin \ | |
| libgdal-dev \ | |
| libgeos-dev \ | |
| libproj-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Crear directorio de la app | |
| WORKDIR /app | |
| # Copiar dependencias primero | |
| COPY requirements.txt . | |
| # Instalar dependencias de Python | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copiar todo el código | |
| COPY . . | |
| # Exponer puerto para Hugging Face Spaces | |
| EXPOSE 7860 | |
| # Comando para arrancar FastAPI con Uvicorn | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |