-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
55 lines (40 loc) · 2.17 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
45
46
47
48
49
50
51
52
53
54
55
FROM node:18 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
# RUN git clone https://github.com/SysCV/sam-hq.git && cd sam-hq && pip install -e .
# RUN pip install timm
# RUN git clone --depth=1 https://github.com/iamlab-cmu/DEXTR-KerasTensorflow.git /tmp/dextr2 && \
# cd /tmp/dextr2 && \
# sed -i "s/from networks/from dextr/g" networks/classifiers.py && \
# sed -i "s/from keras.backend import tf/import tensorflow/g" networks/classifiers.py && \
# sed -i "s/from keras.layers.merge import Concatenate, Add/from keras.layers import concatenate, add/g" networks/classifiers.py && \
# cp networks/classifiers.py /opt/conda/lib/python3.9/site-packages/dextr-0.0.1-py3.9.egg/dextr/ && \
# rm -Rf /tmp/dextr2
ENV FLASK_ENV=production
ENV DEBUG=false
EXPOSE 5000
CMD gunicorn -c webserver/gunicorn_config.py webserver:app --no-sendfile --timeout 180