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/
4
4
COPY ./client /workspace/client
5
5
6
6
RUN npm install -g --quiet \
7
-
8
-
7
+
8
+
9
9
10
10
COPY ./client/package* /workspace/
11
11
@@ -15,34 +15,11 @@ ENV NODE_PATH=/workspace/node_modules
15
15
WORKDIR /workspace/client
16
16
RUN npm run build
17
17
18
- # Setup flask
19
-
20
- FROM python:3.6
18
+ FROM jsbroks/coco-annotator:python-env
21
19
22
20
WORKDIR /workspace/
23
-
24
- # Install python package dependices
25
21
COPY ./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
-
42
22
COPY ./.git /workspace/.git
43
-
44
- # Create server
45
- WORKDIR /workspace/
46
23
RUN python set_path.py
47
24
48
25
COPY --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:
32
32
# spawned to replace it.
33
33
#
34
34
SWAGGER_UI_JSONEDITOR = True
35
- DEBUG = os .getenv ("DEBUG" , False )
35
+ DEBUG = os .getenv ("DEBUG" , 'false' ). lower () == 'true'
36
36
PRELOAD = False
37
37
38
38
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():
73
73
@app .route ('/' , defaults = {'path' : '' })
74
74
@app .route ('/<path:path>' )
75
75
def index (path ):
76
-
76
+
77
77
if app .debug :
78
78
return requests .get ('http://frontend:8080/{}' .format (path )).text
79
79
Original file line number Diff line number Diff line change 1
- FROM python:3.6
1
+ FROM jsbroks/coco-annotator:python-env
2
2
3
3
WORKDIR /workspace/
4
4
5
5
# Install python package dependices
6
6
COPY ./backend/ /workspace/
7
- COPY ./.git /workspace/.git
8
-
9
- RUN pip install -r requirements.txt
10
7
11
8
EXPOSE 5555
12
9
CMD celery -A workers worker -l info
You can’t perform that action at this time.
0 commit comments