-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
44 lines (31 loc) · 1.46 KB
/
Dockerfile
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
42
43
44
FROM node:20 as build-stage
WORKDIR /workspace/
COPY ./client /workspace/client
RUN apt update && \
apt install -y --no-install-recommends libpango1.0-dev libcairo2-dev libpangocairo-1.0-0 && \
apt clean && rm -rf /var/lib/apt/lists/*
RUN npm install -g vite@latest
COPY ./client/package* /workspace/
ENV NODE_PATH=/workspace/node_modules
RUN npm install && npm cache clean --force
WORKDIR /workspace/client
RUN npm --depth 20 update caniuse-lite browserslist
COPY ./client/patch_strict/paper-full.min.js /workspace/node_modules/paper/dist/paper-full.min.js
COPY ./client/patch_strict/paper-full.js /workspace/node_modules/paper/dist/paper-full.js
COPY ./client/patch_strict/paper-full.min.js /workspace/client/node_modules/paper/dist/paper-full.min.js
COPY ./client/patch_strict/paper-full.js /workspace/client/node_modules/paper/dist/paper-full.js
RUN npm run build && npm cache clean --force
FROM jsbroks/coco-annotator:python-env
WORKDIR /workspace/
COPY ./backend/ /workspace/
#COPY ./.git /workspace/.git
RUN python set_path.py
COPY --from=build-stage /workspace/client/dist /workspace/dist
RUN apt update && \
apt install -y --no-install-recommends libsm6 libxext6 libxrender1 libgl1 libglib2.0-0 && \
apt clean && rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir -r ./requirements.txt
ENV FLASK_ENV=production
ENV DEBUG=false
EXPOSE 5000
CMD gunicorn -c webserver/gunicorn_config.py webserver:app --no-sendfile --timeout 180