Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

Dockerfile 853 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  1. # read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
  2. # you will also find guides on how best to write your Dockerfile
  3. FROM node:19 as builder-production
  4. WORKDIR /app
  5. COPY --link --chown=1000 package-lock.json package.json ./
  6. RUN --mount=type=cache,target=/app/.npm \
  7. npm set cache /app/.npm && \
  8. npm ci --omit=dev
  9. FROM builder-production as builder
  10. RUN --mount=type=cache,target=/app/.npm \
  11. npm set cache /app/.npm && \
  12. npm ci
  13. COPY --link --chown=1000 . .
  14. RUN --mount=type=secret,id=DOTENV_LOCAL,dst=.env.local \
  15. npm run build
  16. FROM node:19-slim
  17. RUN npm install -g pm2
  18. COPY --from=builder-production /app/node_modules /app/node_modules
  19. COPY --link --chown=1000 package.json /app/package.json
  20. COPY --from=builder /app/build /app/build
  21. CMD pm2 start /app/build/index.js -i $CPU_CORES --no-daemon
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...