Spaces:
Paused
Paused
Download Dockerfile from 2Btainment/studius: direct link, hf CLI and curl.
- Browser
- Download file 977 Bytes
-
https://huggingface.co/spaces/2Btainment/studius/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/2Btainment/studius/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/2Btainment/studius/resolve/main/Dockerfile
977 Bytes
| FROM python:3.12-slim | |
| RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg && rm -rf /var/lib/apt/lists/* | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /home/user/app | |
| COPY --chown=user server/requirements.txt server/requirements.txt | |
| RUN pip install --no-cache-dir -r server/requirements.txt | |
| COPY --chown=user . . | |
| # HF Docker builds can receive Git-LFS pointer files instead of binaries: fetch any pointer from the Hub | |
| RUN python -c "import os,urllib.request as u;[u.urlretrieve('https://huggingface.co/spaces/2Btainment/studius/resolve/main/'+os.path.relpath(os.path.join(d,f)),os.path.join(d,f)) for d,_,fs in os.walk('.') for f in fs if os.path.getsize(os.path.join(d,f))<200 and open(os.path.join(d,f),'rb').read(40).startswith(b'version https://git-lfs')]" | |
| USER user | |
| ENV HF_HUB_DISABLE_TELEMETRY=1 HF_HUB_DISABLE_PROGRESS_BARS=1 | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "server.main:app", "--host", "0.0.0.0", "--port", "7860", "--proxy-headers", "--forwarded-allow-ips", "*"] | |