diff --git a/services/deoldify-colorizer/Dockerfile b/services/deoldify-colorizer/Dockerfile index 5a7c168..1cd220a 100644 --- a/services/deoldify-colorizer/Dockerfile +++ b/services/deoldify-colorizer/Dockerfile @@ -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"` && \ @@ -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} \ No newline at end of file diff --git a/services/deoldify-colorizer/requirements.txt b/services/deoldify-colorizer/requirements.txt index 8ce46d5..02564d0 100644 --- a/services/deoldify-colorizer/requirements.txt +++ b/services/deoldify-colorizer/requirements.txt @@ -1,3 +1,4 @@ grpcio==1.27.2 grpcio-tools==1.27.2 -requests==2.20.0 \ No newline at end of file +requests==2.20.0 +opencv-python==4.5.3.56 diff --git a/services/deoldify-colorizer/test_service.py b/services/deoldify-colorizer/test_service.py index 9dc0ad5..7fb09ee 100644 --- a/services/deoldify-colorizer/test_service.py +++ b/services/deoldify-colorizer/test_service.py @@ -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: