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 882 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
32
  1. # syntax=docker/dockerfile:1
  2. # read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
  3. # you will also find guides on how best to write your Dockerfile
  4. FROM node:19 as builder-production
  5. WORKDIR /app
  6. COPY --link --chown=1000 package-lock.json package.json ./
  7. RUN --mount=type=cache,target=/app/.npm \
  8. npm set cache /app/.npm && \
  9. npm ci --omit=dev
  10. FROM builder-production as builder
  11. RUN --mount=type=cache,target=/app/.npm \
  12. npm set cache /app/.npm && \
  13. npm ci
  14. COPY --link --chown=1000 . .
  15. RUN --mount=type=secret,id=DOTENV_LOCAL,dst=.env.local \
  16. npm run build
  17. FROM node:19-slim
  18. RUN npm install -g pm2
  19. COPY --from=builder-production /app/node_modules /app/node_modules
  20. COPY --link --chown=1000 package.json /app/package.json
  21. COPY --from=builder /app/build /app/build
  22. 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...