File tree Expand file tree Collapse file tree 6 files changed +47
-32
lines changed Expand file tree Collapse file tree 6 files changed +47
-32
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ WORKDIR /workspace/
44COPY ./client /workspace/client
55
66RUN npm install -g --quiet \
7- 8- 7+ 8+ 99
1010COPY ./client/package* /workspace/
1111
@@ -15,34 +15,11 @@ ENV NODE_PATH=/workspace/node_modules
1515WORKDIR /workspace/client
1616RUN npm run build
1717
18- # Setup flask
19-
20- FROM python:3.6
18+ FROM jsbroks/coco-annotator:python-env
2119
2220WORKDIR /workspace/
23-
24- # Install python package dependices
2521COPY ./backend/ /workspace/
26- RUN pip install -r requirements.txt && \
27- pip install gunicorn[eventlet]==19.9.0 && \
28- pip install pycocotools
29-
30- # Install maskrcnn
31- RUN git clone --single-branch --depth 1 https://github.com/matterport/Mask_RCNN.git /tmp/maskrcnn && \
32- cd /tmp/maskrcnn && \
33- pip install -r requirements.txt && \
34- python3 setup.py install
35-
36- # Install DEXTR
37- RUN git clone --single --depth 1 https://github.com/jsbroks/dextr-keras.git /tmp/dextr && \
38- cd /tmp/dextr && \
39- pip install -r requirements.txt && \
40- python setup.py install
41-
4222COPY ./.git /workspace/.git
43-
44- # Create server
45- WORKDIR /workspace/
4623RUN python set_path.py
4724
4825COPY --from=build-stage /workspace/client/dist /workspace/dist
Original file line number Diff line number Diff line change 1+ # Backend environment docker image
2+ FROM python:3.6
3+
4+ WORKDIR /workspace/
5+
6+ # Copy backend
7+ COPY ./backend/requirements.txt /workspace/
8+
9+ # Install python package dependices
10+ RUN pip install -r requirements.txt && \
11+ pip install gunicorn[eventlet]==19.9.0 && \
12+ pip install pycocotools
13+
14+ # Install maskrcnn
15+ RUN git clone --single-branch --depth 1 https://github.com/matterport/Mask_RCNN.git /tmp/maskrcnn && \
16+ cd /tmp/maskrcnn && \
17+ pip install -r requirements.txt && \
18+ python3 setup.py install
19+
20+ # Install DEXTR
21+ RUN git clone --single --depth 1 https://github.com/jsbroks/dextr-keras.git /tmp/dextr && \
22+ cd /tmp/dextr && \
23+ pip install -r requirements.txt && \
24+ python setup.py install
25+
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ class Config:
3232 # spawned to replace it.
3333 #
3434 SWAGGER_UI_JSONEDITOR = True
35- DEBUG = os .getenv ("DEBUG" , False )
35+ DEBUG = os .getenv ("DEBUG" , 'false' ). lower () == 'true'
3636 PRELOAD = False
3737
3838 MAX_CONTENT_LENGTH = os .getenv ("MAX_CONTENT_LENGTH" , 1 * 1024 * 1024 * 1024 ) # 1GB
Original file line number Diff line number Diff line change 1+ FROM jsbroks/coco-annotator:python-env
2+
3+ WORKDIR /workspace/
4+
5+ # Install python package dependices
6+ COPY ./backend/ /workspace/
7+ COPY ./.git /workspace/.git
8+ RUN python set_path.py
9+
10+ ENV FLASK_ENV=development
11+ ENV DEBUG=true
12+
13+ EXPOSE 5000
14+ CMD gunicorn -c webserver/gunicorn_config.py webserver:app --no-sendfile
15+
16+
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ def create_app():
7373@app .route ('/' , defaults = {'path' : '' })
7474@app .route ('/<path:path>' )
7575def index (path ):
76-
76+
7777 if app .debug :
7878 return requests .get ('http://frontend:8080/{}' .format (path )).text
7979
Original file line number Diff line number Diff line change 1- FROM python:3.6
1+ FROM jsbroks/coco-annotator:python-env
22
33WORKDIR /workspace/
44
55# Install python package dependices
66COPY ./backend/ /workspace/
7- COPY ./.git /workspace/.git
8-
9- RUN pip install -r requirements.txt
107
118EXPOSE 5555
129CMD celery -A workers worker -l info
You can’t perform that action at this time.
0 commit comments