Download Dockerfile from Mike0021/open-art-search-api: direct link, hf CLI and curl.
- Browser
- Download file 1.07 kB
-
https://huggingface.co/spaces/Mike0021/open-art-search-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Mike0021/open-art-search-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Mike0021/open-art-search-api/resolve/main/Dockerfile
1.07 kB
| # Open Art Search API — Hugging Face Docker Space. Staged by scripts/deploy-api.sh with the same layout as app/ | |
| # (package.json + lockfile, src/ core modules, server/, public/data/<build>/), so imports resolve exactly as in the repo. | |
| FROM node:22-bookworm-slim | |
| ENV NODE_ENV=production PORT=7860 MODEL_DIR=/home/node/app/.model | |
| # Spaces run containers as uid 1000, which is the image's "node" user | |
| USER node | |
| WORKDIR /home/node/app | |
| COPY --chown=node package.json package-lock.json ./ | |
| # same lockfile as the app: production deps only (@huggingface/transformers → onnxruntime-node) | |
| RUN npm ci --omit=dev --no-audit --no-fund && npm cache clean --force | |
| # bake the public query model (pinned revision) into the image and load it offline once, as the server will; | |
| # at runtime the model is read from MODEL_DIR with remote access disabled | |
| COPY --chown=node server/embed.mjs server/ | |
| RUN node server/embed.mjs --prefetch | |
| COPY --chown=node src/ src/ | |
| COPY --chown=node server/ server/ | |
| COPY --chown=node public/data/ public/data/ | |
| EXPOSE 7860 | |
| CMD ["node", "server/server.mjs"] | |