Spaces:
Paused
Paused
Download Dockerfile from modventures/prevision: direct link, hf CLI and curl.
- Browser
- Download file 2.06 kB
-
https://huggingface.co/spaces/modventures/prevision/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/modventures/prevision/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/modventures/prevision/resolve/main/Dockerfile
2.06 kB
| FROM node:22-slim AS prevision-api | |
| WORKDIR /repo | |
| RUN corepack enable | |
| COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ | |
| COPY apps/prevision-api/package.json apps/prevision-api/ | |
| RUN pnpm install --frozen-lockfile --filter @prevision/api | |
| COPY apps/prevision-api/ apps/prevision-api/ | |
| RUN pnpm --filter @prevision/api generate && \ | |
| pnpm --filter @prevision/api build && \ | |
| pnpm --filter @prevision/api deploy --prod --legacy /out | |
| FROM python:3.12-slim | |
| # A Space exposes one port (7860), so nginx owns it and the renderer moves to 7861. | |
| ENV PYTHONUNBUFFERED=1 \ | |
| PYTHONDONTWRITEBYTECODE=1 \ | |
| HF_HOME=/home/user/.cache/huggingface \ | |
| VISUALIZER_CONFIG=visualizer.gpu.toml \ | |
| VISUALIZER_PORT=7861 \ | |
| PREVISION_API_PORT=8001 \ | |
| PREVISION_API_INTERNAL_URL=http://127.0.0.1:8001 \ | |
| AUTH_ENFORCEMENT=on \ | |
| PROCESSING_TOKEN_AUDIENCE=prevision-processing \ | |
| HOME=/home/user | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends \ | |
| bash \ | |
| curl \ | |
| git \ | |
| git-lfs \ | |
| procps \ | |
| wget \ | |
| ffmpeg \ | |
| libglib2.0-0 \ | |
| libgomp1 \ | |
| build-essential \ | |
| ca-certificates \ | |
| nginx && \ | |
| rm -rf /var/lib/apt/lists/* | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /app | |
| COPY apps/renderer/requirements-base.txt apps/renderer/requirements-gpu-cu126.txt ./ | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements-gpu-cu126.txt | |
| COPY --chown=user:1000 apps/renderer/ /app/ | |
| COPY --from=prevision-api /usr/local/bin/node /usr/local/bin/node | |
| COPY --chown=user:1000 --from=prevision-api /out /srv/prevision | |
| COPY infra/runpod/start.sh /usr/local/bin/start-services | |
| COPY infra/huggingface/start.sh /usr/local/bin/start-space | |
| COPY infra/huggingface/nginx.conf /etc/prevision/nginx.conf | |
| RUN chmod 0755 /usr/local/bin/start-services /usr/local/bin/start-space && \ | |
| mkdir -p data/uploads data/jobs data/qa-runs && \ | |
| chown -R user:1000 /app /srv/prevision | |
| USER user | |
| EXPOSE 7860 | |
| CMD ["/usr/local/bin/start-space"] | |