Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
arturgontijo committed Sep 10, 2021
2 parents bae0f0f + 972d503 commit b5b1453
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
14 changes: 7 additions & 7 deletions services/deoldify-colorizer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN apt-get update && \
curl

# OpenCV dependencies
RUN apt-get install -y libglib2.0-0 libsm6 libxext6 libxrender-dev
RUN apt-get install -y libglib2.0-0 libsm6 libxext6 libxrender-dev libgl1-mesa-glx

# Installing SNET Daemon
RUN SNETD_GIT_VERSION=`curl -s https://api.github.com/repos/singnet/snet-daemon/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")' || echo "v5.0.1"` && \
Expand All @@ -37,16 +37,16 @@ RUN cd ${SINGNET_REPOS} && \
cd ${DNN_REPO_NAME}/utils && \
./get_colorize_model.sh

# Installing deps and building protobuf messages
RUN cd ${SERVICES_FOLDER}/${SERVICE_NAME} && \
pip install -U pip==20.2.4 && \
pip install -r requirements.txt && \
sh buildproto.sh

# DeOldify Repository
RUN cd ${SERVICES_FOLDER}/${SERVICE_NAME} && \
git submodule update --init -- DeOldify && \
cd DeOldify && \
pip install -U pip==20.2.4 && \
pip install -r requirements.txt

# Building protobuf messages
RUN cd ${SERVICES_FOLDER}/${SERVICE_NAME} && \
pip install -r requirements.txt && \
sh buildproto.sh

WORKDIR ${SERVICES_FOLDER}/${SERVICE_NAME}
3 changes: 2 additions & 1 deletion services/deoldify-colorizer/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
grpcio==1.27.2
grpcio-tools==1.27.2
requests==2.20.0
requests==2.20.0
opencv-python==4.5.3.56
2 changes: 1 addition & 1 deletion services/deoldify-colorizer/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

if grpc_method == "colorize":
response = stub.colorize(grpc_input)
if response.img_colorized == "Fail":
if response.img_colorized == "Fail" or len(response.img_colorized) == 0:
print(response.img_colorized)
exit(1)
else:
Expand Down

0 comments on commit b5b1453

Please sign in to comment.