Spaces:
Sleeping
Sleeping
Download Dockerfile from arrondavide/meroni-api: direct link, hf CLI and curl.
- Browser
- Download file 693 Bytes
-
https://huggingface.co/spaces/arrondavide/meroni-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/arrondavide/meroni-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/arrondavide/meroni-api/resolve/main/Dockerfile
693 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install system deps for MNE/scipy | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| gcc g++ && \ | |
| rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| # Install CPU-only PyTorch first (saves ~1.5GB vs full torch) | |
| RUN pip install --no-cache-dir torch==2.4.0 --index-url https://download.pytorch.org/whl/cpu | |
| # Install remaining deps | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| # Train model if weights don't exist | |
| RUN if [ ! -f model_weights.pt ]; then python train.py --epochs 100 --n_synthetic 5000 --output model_weights.pt; fi | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |