oarriaga/face_classification

Custom docker image not working

alejandrosanchezcabana opened this issue · 2 comments

Hey guys,

First of all, congrats for your awesome work here.

I've downloaded your repo and user your docker image, but when I try to build my own docker image, without any modification from the code in master branch. I'm able to build it, but I got an image that is able to process 1 image, but after that it always fail.

ERROR:root:Error in emotion gender processor: "Cannot interpret feed_dict key as Tensor: Tensor Tensor("Placeholder_28:0", shape=(1, 1, 16, 32), dtype=float32) is not an element of this graph."

ERROR:root:An error has occurred whilst processing the file: "local variable 'rgb_image' referenced before assignment"

172.17.0.1 - - [12/Jan/2019 10:05:53] "POST /classifyImage HTTP/1.1" 400 -
INFO:werkzeug:172.17.0.1 - - [12/Jan/2019 10:05:53] "POST /classifyImage HTTP/1.1" 400 -

Thanks

Hola @alejandrosanchezcabana
I suggest you to build your own image, however the Dockerfile looks very outdated (debian:latest from 2017) and the build crash. Replace the Dockerfile with this one and it will work:

FROM jjanzic/docker-python3-opencv:contrib-opencv-3.2.0

RUN apt-get -y update && apt-get install -y git vim procps curl

#Face classificarion dependencies & web application
RUN pip3 install numpy==1.13.3 scipy==1.2.1 scikit-learn pillow tensorflow==1.1.0 pandas==0.19.1 h5py==2.7.0 opencv-python==3.2.0.8 keras==2.0.5 statistics pyyaml pyparsing cycler matplotlib Flask

ADD . /ekholabs/face-classifier

WORKDIR ekholabs/face-classifier

ENV PYTHONPATH=$PYTHONPATH:src
ENV FACE_CLASSIFIER_PORT=8084
EXPOSE $FACE_CLASSIFIER_PORT

ENTRYPOINT ["python3"]
CMD ["src/web/faces.py"]

Hola @enric1994

Finally I was able to build it using my version forked, feel free to merge it (I just opened a PR #126)