Download Dockerfile from igorktech/pinned: direct link, hf CLI and curl.
- Browser
- Download file 988 Bytes
-
https://huggingface.co/spaces/igorktech/pinned/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/igorktech/pinned/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/igorktech/pinned/resolve/main/Dockerfile
988 Bytes
| # Pinned demo on Hugging Face Spaces (sdk: docker). The build context is the folder | |
| # deploy/hf-space/build.sh assembles: a copy of client/ plus pitch.mp4. | |
| FROM node:22-slim | |
| # HF runs the container as uid 1000; in node images that's the existing `node` user. | |
| RUN corepack enable | |
| USER node | |
| WORKDIR /home/node/app | |
| COPY --chown=node package.json pnpm-lock.yaml pnpm-workspace.yaml ./ | |
| RUN pnpm install --frozen-lockfile | |
| COPY --chown=node . . | |
| # The tldraw license key arrives as a Space variable (HF passes variables as build args). | |
| ARG VITE_TLDRAW_LICENSE_KEY | |
| RUN if [ -z "$VITE_TLDRAW_LICENSE_KEY" ]; then \ | |
| echo "VITE_TLDRAW_LICENSE_KEY is empty: set it as a variable on the Space"; exit 1; \ | |
| fi | |
| RUN VITE_TLDRAW_LICENSE_KEY="$VITE_TLDRAW_LICENSE_KEY" pnpm build | |
| # demo mode: every visitor gets a freshly seeded board, the agent is off, the video streams | |
| ENV PORT=7860 DATA_DIR=/tmp/pinned DEMO_MODE=1 DEMO_VIDEO=/home/node/app/pitch.mp4 | |
| EXPOSE 7860 | |
| CMD ["node", "server/server.ts"] | |