Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation of grpc with pip in docker image very slow #20493

Closed
vizero1 opened this issue Oct 4, 2019 · 4 comments
Closed

Installation of grpc with pip in docker image very slow #20493

vizero1 opened this issue Oct 4, 2019 · 4 comments

Comments

@vizero1
Copy link

vizero1 commented Oct 4, 2019

What version of gRPC and what language are you using?

GRPC version 1.24.1
Python 3.6

What operating system (Linux, Windows,...) and version?

Linux

What runtime / compiler are you using (e.g. python version or version of gcc)

Python

What did you do?

I am trying to create a docker image with grpc for python. But the command
pip3 install grpcio grpcio-tools
takes too much time. I am waiting now more than half an hour.
My docker images uses ubuntu 18.04 as a base image and I am building it on arm64.
Also if I try to cross compile it on my x86_64 for arm64 with the help of qemu, it takes forever.

What did you expect to see?

A fast installation of grpc

What did you see instead?



> Building wheels for collected packages: grpcio, grpcio-tools
>   Building wheel for grpcio (setup.py): started
>   Building wheel for grpcio (setup.py): still running...
>   Building wheel for grpcio (setup.py): still running...
>   Building wheel for grpcio (setup.py): still running...
>   Building wheel for grpcio (setup.py): still running...
>   Building wheel for grpcio (setup.py): still running...
>   Building wheel for grpcio (setup.py): still running...
>   Building wheel for grpcio (setup.py): still running...
>   Building wheel for grpcio (setup.py): still running...
>   Building wheel for grpcio (setup.py): still running...
>   Building wheel for grpcio (setup.py): still running...
>   Building wheel for grpcio (setup.py): still running...
>   Building wheel for grpcio (setup.py): still running...
>   Building wheel for grpcio (setup.py): still running...
>   Building wheel for grpcio (setup.py): still running...
>   Building wheel for grpcio (setup.py): still running...

First lines of my Dockerfile( get stuck in the last line):


FROM ubuntu-18-base-image
WORKDIR /usr/src/app
RUN apt-get update && \
    apt-get install python3-setuptools cmake build-essential swig python3-dev -y && \
    DEBIAN_FRONTEND=noninteractive apt-get install python3-opencv -y && \
    pip3 install wheel
COPY . .
RUN pip3 install grpcio grpcio-tools

@lidizheng
Copy link
Contributor

@vizero1 If you are using emulator to compile grpcio, it does take forever (much more than half an hour). We do provide compiled wheels for for armv7, another place to find grpcio arm wheels are https://www.piwheels.org/project/grpcio/.

Can you take a look at the resources above, if your problem still unresolved, can you provide more information about your setup? e.g. is it armv6 or armv7?

@vizero1
Copy link
Author

vizero1 commented Oct 14, 2019

@lidizheng The last few days I tried to do a minimalistic setup to test grpcio.
I am trying to build it now for an i.MX8M dev board (without qemu or any other simulation). It is armv8. If I try to build it directly on the board it compiles it from source instead of using a compiled wheel and that takes really long.
Your link only provides wheels for armv6 or armv7 embedded boards.
Are there any compiled wheels for armv8?
Thanks in advance

@lidizheng
Copy link
Contributor

lidizheng commented Oct 14, 2019

@vizero1 Unfortunately, we are not pre-compiling for armv8 right now. This issue can be used as an feature request.

On the other hand, the armv6 and armv7 are theoretically compatible with armv8. The reason your device didn't pick up those wheels are because you are using 3.6, and since https://www.piwheels.org/project/grpcio/ is meant for Raspberry Pi they don't build for 3.6. I would suggest give it a try to use 3.7 or 3.5.

@vizero1
Copy link
Author

vizero1 commented Oct 18, 2019

@lidizheng thanks for the answer.
Then this ticket can be closed if there are no precompiled wheels for armv8.

@vizero1 vizero1 closed this as completed Oct 18, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants