Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ FROM node:10 as build-stage
WORKDIR /workspace/
COPY ./client /workspace/client

RUN npm install -g --quiet \
@vue/cli@3.3.0 \
@vue/cli-service@3.3.0
RUN npm install -g @vue/cli@3.3.0
RUN npm install -g @vue/cli-service@3.3.0

COPY ./client/package* /workspace/

Expand All @@ -29,4 +28,3 @@ ENV DEBUG=false

EXPOSE 5000
CMD gunicorn -c webserver/gunicorn_config.py webserver:app --no-sendfile --timeout 180

14 changes: 8 additions & 6 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Backend environment docker image
FROM python:3.6
FROM tensorflow/tensorflow:1.14.0-gpu-py3

RUN apt-get update
RUN apt-get install -y git

WORKDIR /workspace/

Expand All @@ -12,14 +15,13 @@ RUN pip install -r requirements.txt && \
pip install pycocotools

# Install maskrcnn
RUN git clone --single-branch --depth 1 https://github.com/matterport/Mask_RCNN.git /tmp/maskrcnn && \
cd /tmp/maskrcnn && \
pip install -r requirements.txt && \
python3 setup.py install
RUN git clone --single-branch --depth 1 https://github.com/matterport/Mask_RCNN.git /tmp/maskrcnn
#RUN cd /tmp/maskrcnn && pip install -r requirements.txt
RUN cd /tmp/maskrcnn && python3 setup.py install

# Install DEXTR
RUN git clone --single --depth 1 https://github.com/jsbroks/dextr-keras.git /tmp/dextr && \
cd /tmp/dextr && \
pip install -r requirements.txt && \
python setup.py install

RUN apt-get -y -o Dpkg::Options::="--force-confmiss" install --reinstall netbase
9 changes: 9 additions & 0 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,12 @@ pytest-ordering==0.6
imantics==0.1.9
flask-socketio==3.3.2
celery==4.2.2

scipy
Pillow
matplotlib
keras==2.1.1
h5py
imgaug
IPython[all]
jupyter
3 changes: 3 additions & 0 deletions build_gpu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
docker build -f ./backend/Dockerfile . -t jsbroks/coco-annotator:python-env --no-cache
docker build . -t annotator_webclient_gpu --no-cache
docker build -f ./backend/workers/Dockerfile . -t annotator_workers_gpu --no-cache
Empty file added db/.gitkeep
Empty file.
83 changes: 83 additions & 0 deletions docker-compose.gpu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
version: "3"

networks:
cocoannotator:
external: false

services:
webserver:
image: annotator_webclient_gpu
container_name: annotator_webclient
restart: "no"
ports:
- "5000:5000"
environment:
- SECRET_KEY=RandomSecretKeyHere
- FILE_WATCHER=true
- NAME=Test Annotator
- MASK_RCNN_FILE=/models/mask_rcnn_coco.h5
# # Default coco classes (order matters)
- MASK_RCNN_CLASSES=
BG,person,bicycle,car,motorcycle,airplane,
bus,train,truck,boat,traffic light,
fire hydrant,stop sign,parking meter,bench,bird,
cat,dog,horse,sheep,cow,elephant,bear,
zebra,giraffe,backpack,umbrella,handbag,tie,
suitcase,frisbee,skis,snowboard,sports ball,
kite,baseball bat,baseball glove,skateboard,
surfboard,tennis racket,bottle,wine glass,cup,
fork,knife,spoon,bowl,banana',apple,
sandwich,orange,broccoli,carrot,hot dog,pizza,
donut,cake,chair,couch,potted plant,bed,
dining table,toilet,tv,laptop,mouse,remote,
keyboard,cell phone,microwave,oven,toaster,
sink,refrigerator,book,clock,vase,scissors,
teddy bear,hair drier,toothbrush
volumes:
- "./datasets:/datasets"
- "./models:/models"
depends_on:
- database
- workers
networks:
- cocoannotator
workers:
container_name: annotator_workers
image: annotator_workers_gpu
volumes:
- "./backend/config:/workspace/config"
- "./backend/webserver:/workspace/webserver"
- "./backend/workers:/workspace/workers"
- "./backend/database:/workspace/database"
- "./datasets:/datasets"
depends_on:
- messageq
- database
ports:
- 5555:5555
networks:
- cocoannotator
messageq:
image: rabbitmq:3
container_name: annotator_message_q
environment:
- RABBITMQ_DEFAULT_USER=user
- RABBITMQ_DEFAULT_PASS=password
ports:
- 5672:5672
networks:
- cocoannotator
database:
image: mongo:4.0
container_name: annotator_mongodb
restart: "no"
environment:
- MONGO_DATA_DIR=/data/db
- MONGO_LOG_DIR=/dev/null
volumes:
- "./db:/data/db"
ports:
- "27017:27017"
command: "mongod --smallfiles --logpath=/dev/null"
networks:
- cocoannotator