Spaces:
Paused
Paused
Download Dockerfile from MohsinElis/patch-mfft-api: direct link, hf CLI and curl.
- Browser
- Download file 693 Bytes
-
https://huggingface.co/spaces/MohsinElis/patch-mfft-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/MohsinElis/patch-mfft-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/MohsinElis/patch-mfft-api/resolve/main/Dockerfile
693 Bytes
| FROM python:3.11-slim | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu \ | |
| && pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| RUN chown -R user:user /app | |
| ENV PATCH_MFFT_CHECKPOINT_DIR=/app/checkpoints \ | |
| PATCH_MFFT_IMG_SIZE=384 \ | |
| PATCH_MFFT_VARIANT=base \ | |
| HF_HOME=/tmp/hf \ | |
| PORT=7860 | |
| USER user | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "7860"] | |