Download Dockerfile from slapbox/S1: direct link, hf CLI and curl.
- Browser
- Download file 1.24 kB
-
https://huggingface.co/spaces/slapbox/S1/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/slapbox/S1/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/slapbox/S1/resolve/main/Dockerfile
1.24 kB
| FROM debian:bookworm-slim | |
| USER root | |
| RUN apt-get update && apt-get install -y curl unzip ca-certificates && rm -rf /var/lib/apt/lists/* | |
| # Install Bun to a global path instead of /root/.bun | |
| ENV BUN_INSTALL=/usr/local/bun | |
| RUN curl -fsSL https://bun.sh/install | bash | |
| ENV PATH="/usr/local/bun/bin:$PATH" | |
| RUN bun --version | |
| # Copy ffmpeg | |
| COPY --from=mwader/static-ffmpeg:6.1.1 --chmod=755 /ffmpeg /usr/local/bin/ | |
| COPY --from=mwader/static-ffmpeg:6.1.1 --chmod=755 /ffprobe /usr/local/bin/ | |
| RUN ffmpeg -version | |
| # Create HF Spaces runtime user | |
| RUN useradd -m -u 1000 user | |
| # Pre-create /data with open permissions | |
| # RUN mkdir -p /data && chmod -R 777 /data | |
| WORKDIR /app | |
| COPY --chown=user package.json ./ | |
| ENV PUPPETEER_SKIP_DOWNLOAD="true" | |
| ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD="1" | |
| ENV PLAYWRIGHT_BROWSERS_PATH="0" | |
| RUN bun install --production | |
| # Switch to runtime user — Bun is now in PATH because /usr/local/bun/bin is world-accessible | |
| USER user | |
| ENV PATH="/usr/local/bun/bin:/usr/local/bin:$PATH" | |
| ENV FFMPEG_V="6.1.1" | |
| ENV FFPROBE_V="6.1.1" | |
| ENV NODE_TLS_REJECT_UNAUTHORIZED="0" | |
| ENV NODE_ENV=production | |
| ENV CPU_0V1=1 | |
| ENV STORAGE_ROOT="/tmp" | |
| ENV PORT=7860 | |
| COPY --chown=user . . | |
| EXPOSE 7860 | |
| CMD ["bun", "run", "start:prod:tsdown"] | |