Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Unknown desc #7

Open
AV-Coding opened this issue Aug 22, 2019 · 31 comments
Open

Unknown desc #7

AV-Coding opened this issue Aug 22, 2019 · 31 comments

Comments

@AV-Coding
Copy link

My buddy and I have followed the documentation and it seems like everything is working fine. When we run the command "minikube service list" we get this output:
Screenshot from 2019-08-22 15-20-03
However, when we try to use "curl -d '{"path":"/unknown_people/unknown220.jpg"}' http://192.168.99.106:30584/image/post
got path: {Path:/unknown_people/unknown220.jpg}"
we get this output in the image-processor:
Screenshot from 2019-08-22 15-24-19
Any ideas what the issue might be?

@Skarlso
Copy link
Owner

Skarlso commented Sep 2, 2019

@AV-Coding Hi! First off thank you for the issue!

Second, I'm so sorry I didn't notice there is one. :O I have no idea why I didn't get notified. :( I'll take a look ASAP.

@Skarlso
Copy link
Owner

Skarlso commented Sep 2, 2019

Oh crap I know why. How didn't this come up in my testing, I have no idea. :(

Thank you for pointing this out to me. This should have returned the image's name. When in reality it returned a list. :/ I'll fix this asap.

@Skarlso
Copy link
Owner

Skarlso commented Sep 2, 2019

Oh snap! I fixed this already. I might just not have updated teh docker container? :(

@Skarlso
Copy link
Owner

Skarlso commented Sep 2, 2019

@AV-Coding Please try now... hopefully the fix should be now applied.

@AV-Coding
Copy link
Author

We are trying do this on a raspberry pi cluster, do you think that may be the issue? We were also having an issue with the face_recognition image, any idea how we can use your image or maybe another substitute, it doesn't seem to support armhf architecture.

@Skarlso
Copy link
Owner

Skarlso commented Sep 2, 2019

Ah, I see. You can easily build your own docker image using the Dockerfile that is provided? Just change the OS that it depends on to one that you can use? Also, you probably will have to change the things that it installs and how it installs them unfortunately.

@Skarlso
Copy link
Owner

Skarlso commented Sep 2, 2019

You would have to use this as a base type: https://hub.docker.com/u/armhf/

@Skarlso
Copy link
Owner

Skarlso commented Sep 2, 2019

This looks promising: https://hub.docker.com/r/arm32v7/golang

@AV-Coding
Copy link
Author

Thanks for the response. We've tried using the Dockerfile to build our own docker image, but we received many errors unfortunately. It probably has to do with how it installs things, like you were saying.

@Skarlso
Copy link
Owner

Skarlso commented Sep 2, 2019

Yeah, you either have to use a different base and adjust the installation process accordingly, or flash a normal ubuntu onto the raspberry. That said... Hmm. The Pod should be able to run in a different linux distro. What is the error you are getting now?

@Skarlso
Copy link
Owner

Skarlso commented Sep 3, 2019

I have a couple of raspberrys I'll try to replicate it on my home cluster.

Also, you have to take into account that I kind of hardcoded the PVC? Please set that up to your liking.

@AV-Coding
Copy link
Author

AV-Coding commented Sep 3, 2019

We were thinking of removing Raspbian, and placing ubuntu mate. When we try building face_recog from the docker file, it does send errors, but the main problem is it just stops building at some point. This is as far as we get:
received_674930739688760
This is on step 4 I believe.
What does PVC stand for?

@Skarlso
Copy link
Owner

Skarlso commented Sep 3, 2019

Huh odd. PVC is PersistentVolumeClaim. It's hard oded right now to my local path. You need to change that.

Also you shouldn't have to rebuild the container. Docker should abstract the os and it should just run on the raspberry I believe. I fixed the face recog image. I think it should work if you try that again.

@AV-Coding
Copy link
Author

This is the error we are getting when we try implementing it on minikube using our local machine (not Rasberry pi):
Screenshot from 2019-09-04 13-14-23

@AV-Coding
Copy link
Author

AV-Coding commented Sep 4, 2019

We went ahead and deleted the old repository, and downloaded it again using "git clone https://github.com/Skarlso/kube-cluster-sample.git"

Edit #1:
We realized you recently made another branch, we are going to try that out now.
Edit #2:
We are getting the same issue when we added the other branch.

@Skarlso
Copy link
Owner

Skarlso commented Sep 5, 2019

It's the image you have to re pull. The face_recog docker image is the one you have to pull down.

@Skarlso
Copy link
Owner

Skarlso commented Sep 5, 2019

I changed the image pull policy to always so the modification can be redownloaded. Please try now to clear your cluster and re-make it with minikube.

@Skarlso
Copy link
Owner

Skarlso commented Sep 5, 2019

Alright. I reproduced your problem.

2019/09/05 05:28:14 Got a message: 1
2019/09/05 05:28:14 Processing image id:  1
2019/09/05 05:28:16 error from processImages:  rpc error: code = Unknown desc = Exception calling application: ['not_found', 'not_found', 'gergely_01.jpg'] has type list, but expected one of: bytes, unicode

Finally. :) I'll have a fix up soon. Thanks man. Interesting this used to work. 🤔Don't know yet what happened.

@Skarlso
Copy link
Owner

Skarlso commented Sep 5, 2019

Oh it's a list of lists. It probably worked because it was running old code because of the image pull policy. Dang. :) nice catch, thanks. :))

@Skarlso
Copy link
Owner

Skarlso commented Sep 5, 2019

Screenshot 2019-09-05 at 07 54 16

Thank you for this!! It works now. The problem was that the multiprocessor pool map was creating a list of lists. And my testing didn't catch it because I fail to version my docker containers properly. But I'll fix that in #9.

@Skarlso
Copy link
Owner

Skarlso commented Sep 5, 2019

Alright. It should work now! :)

I also found that not found people show up as pending for some reason instead of john doe, humpf. I'll take a look at that later. :) Thank you!

@AV-Coding
Copy link
Author

That worked! Thanks so much for the help. I will try again to put it on my Raspberry Pi cluster. I'll let you know how it goes.

@Skarlso
Copy link
Owner

Skarlso commented Sep 5, 2019

Awesome!! Very glad to hear that. :) Thank you very much for bringing it to my attention. :)

@AV-Coding
Copy link
Author

So we tried again with the raspberry pi's and we get this error again on step 4:
Screenshot from 2019-09-05 14-54-13
I would like to mention that we use images hypriot/rpi-mysql and mhlg/rpi-nsq respectively for mysql and nsqlookup since they aren't compatible with raspbian. Could these image cause a conflict by any chance? Any ideas are appreciated.

@Skarlso
Copy link
Owner

Skarlso commented Sep 6, 2019

Step 4 as in this part?

RUN cd ~ && \
    mkdir -p dlib && \
    git clone -b 'v19.9' --single-branch https://github.com/davisking/dlib.git dlib/ && \
    cd  dlib/ && \
    python3 setup.py install --yes USE_AVX_INSTRUCTIONS

Of the face recognition docker image, right?

For a start, please remove this line: --yes USE_AVX_INSTRUCTIONS.

And then try using v19.17. 9 is a year old now. Maybe some things got fixed.

Also, you might be missing build essentials maybe? Can I take a look at your docker file? Or are you just trying to build this docker file in the repo? (( I'll try doing that too see if I can reproduce the issue )).

@Skarlso
Copy link
Owner

Skarlso commented Sep 6, 2019

So, I reproduced it on my own raspberry.

It appears that the red things are only warnings. One thing of interest is this though:

package init file 'dlib/__init__.py' not found (or not a regular file)

This might be something that we need to address. It appears that cmake needs to be installed. That might fix this.

Also, mine does continue, but it's EXTREMELY slow. :) It's at 76% right now and it's still going. It just ticked to 77% and throwing a bunch of warnings. Never the less it should work. The warning are usually of some kind of C++ version changes. :/ Probably some version of gc++ could fix it, no idea. :(

@Skarlso
Copy link
Owner

Skarlso commented Sep 6, 2019

Hmm... hang on. This Dockerfile might be out of date actually checking out the issues and the Repo.

You could try replacing the entire Step 4 with this:

RUN python3 -m pip install dlib

Try doing this and see if that works. :)

@AV-Coding
Copy link
Author

I'm trying to build the docker file from the repo, and yes from the face_recog image. We also went ahead and installed cmake. It is very slow, right now it is at 89% and has been going for about 20 hours now.

@Skarlso
Copy link
Owner

Skarlso commented Sep 7, 2019

This worked!

Building wheel for dlib (setup.py): still running...
  Building wheel for dlib (setup.py): finished with status 'done'
  Created wheel for dlib: filename=dlib-19.17.0-cp36-cp36m-linux_armv7l.whl size=2986250 sha256=84f1d93a3caabc863494ddac2a9a3b78da2c116b008c208792fe252b3f34819b
  Stored in directory: /root/.cache/pip/wheels/50/b6/b5/5f46aacfd18028ff57591cfb53fcc7554362977c15e9060e67
Successfully built dlib
Installing collected packages: dlib
Successfully installed dlib-19.17.0
Removing intermediate container 58735a780380
 ---> f9c23041e6dc
Step 6/14 : RUN python3 -m pip install face_recognition
 ---> Running in f839adeafbf0

The RUN python3 -m pip install dlib worked like a charm. :) This is my docker file now:

FROM python:3.6-slim

LABEL Author="Gergely Brautigam"

RUN apt-get -y update
RUN apt-get install -y --fix-missing \
    libatlas-base-dev \
    build-essential \
    cmake \
    gfortran \
    git \
    wget \
    curl \
    graphicsmagick \
    libgraphicsmagick1-dev \
    libavcodec-dev \
    libavformat-dev \
    libgtk2.0-dev \
    libjpeg-dev \
    liblapack-dev \
    libswscale-dev \
    pkg-config \
    python3-dev \
    python3-numpy \
    software-properties-common \
    zip \
    && apt-get clean && rm -rf /tmp/* /var/tmp/*

#RUN cd ~ && \
#    mkdir -p dlib && \
#    git clone -b 'v19.17' --single-branch https://github.com/davisking/dlib.git dlib/ && \
#    cd  dlib/ && \
#    python3 setup.py install

RUN python3 -m pip install dlib
RUN python3 -m pip install face_recognition
RUN python3 -m pip install grpcio
RUN python3 -m pip install grpcio-tools

COPY face_pb2_grpc.py /root
COPY face_pb2.py /root
COPY identifier.py /root

VOLUME [ "/unknown_people", "/known_people" ]

EXPOSE 50051

CMD [ "python3", "/root/identifier.py" ]

Notice also that I used libatlas-base-dev instead of libatlas-dev. If this says not found, just put it back to libatlas-dev.

This was faster than trying to install the source.

@Skarlso
Copy link
Owner

Skarlso commented Sep 23, 2019

Hey @AV-Coding. Do you have an update? :)

@AV-Coding
Copy link
Author

Hi Skarlso, I don't have any update unfortunately. I'm back in school and haven't made time to work on it again. It's unfortunate because I think it was just about finished. Hopefully I can work on it soon, but if not, definitely once i'm out of classes. I'll let you know once it's finished :) I appreciate all the help you given.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants