-
Notifications
You must be signed in to change notification settings - Fork 626
/
Dockerfile.demo
41 lines (30 loc) · 1.07 KB
/
Dockerfile.demo
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
33
34
35
36
37
38
39
40
41
FROM nikolaik/python-nodejs:python3.8-nodejs14 AS builder
WORKDIR /home/visualdl
COPY . .
RUN apt-get update && apt-get -y --no-install-recommends install cmake && rm -rf /var/lib/apt/lists/*
RUN ["pip", "install", "--disable-pip-version-check", "-r", "requirements.txt"]
RUN ["python", "setup.py", "bdist_wheel"]
RUN ["pip", "install", "--disable-pip-version-check", "--find-links=dist", "visualdl"]
WORKDIR /home/visualdl/frontend
ENV SCOPE server
ENV PUBLIC_PATH /paddle/visualdl/demo
ENV TELEMETRY_ID b281676ad3824647971c6fd92d65f642
RUN ["./scripts/install.sh"]
RUN ["./scripts/build.sh"]
FROM node:14-alpine
WORKDIR /home/visualdl
COPY --from=builder /home/visualdl/frontend/output/server.tar.gz /tmp
ENV NODE_ENV production
ENV PING_URL /ping
ENV DEMO true
ENV HOST 0.0.0.0
ENV PORT 8999
RUN apk update && \
apk upgrade && \
apk add --no-cache --virtual .build-deps git && \
tar zxf /tmp/server.tar.gz && \
rm /tmp/server.tar.gz && \
yarn install --no-lockfile && \
yarn cache clean && \
apk del --no-network .build-deps
ENTRYPOINT ["yarn", "start"]