Download Dockerfile from Madras1/AetherMap: direct link, hf CLI and curl.
- Browser
- Download file 1.32 kB
-
https://huggingface.co/spaces/Madras1/AetherMap/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Madras1/AetherMap/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Madras1/AetherMap/resolve/main/Dockerfile
1.32 kB
| # ============================================================================== | |
| # Dockerfile — AetherMap API (versão profissional) | |
| # ============================================================================== | |
| # Imagem Python robusta (não slim → evita erros de build) | |
| FROM python:3.10 | |
| # Define diretório da aplicação | |
| WORKDIR /app | |
| # Atualiza o instalador da imagem-base antes de resolver wheels modernas. | |
| RUN python -m pip install --no-cache-dir --upgrade pip setuptools wheel | |
| # Instala somente o runtime PyTorch usado pelo AetherMap. A versão e o build | |
| # CPU ficam fixos para impedir que um novo release quebre builds futuros. | |
| # O índice extra permite resolver dependências auxiliares no PyPI sem trocar | |
| # a wheel CPU escolhida explicitamente abaixo. | |
| RUN python -m pip install --no-cache-dir \ | |
| "torch==2.12.1+cpu" \ | |
| --index-url https://download.pytorch.org/whl/cpu \ | |
| --extra-index-url https://pypi.org/simple | |
| # Copiar requirements | |
| COPY requirements.txt . | |
| # Instalar dependências restantes | |
| RUN python -m pip install --no-cache-dir -r requirements.txt | |
| # Copiar código da aplicação | |
| COPY . . | |
| # Expor porta usada pelo Hugging Face Spaces | |
| EXPOSE 7860 | |
| # Comando padrão para executar FastAPI | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |