首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >下载grpcio反射时Pypi / pip块

下载grpcio反射时Pypi / pip块
EN

Stack Overflow用户
提问于 2017-10-11 10:57:04
回答 1查看 740关注 0票数 0

用pip安装grpcio-reflection需要很长时间。

这是很奇怪的,因为pip包在PyPI中只有8KB,但是下载需要超过一分钟,而其他以兆字节为单位的包的下载速度非常快。

更新:它没有下载,有大量的编译正在进行。它似乎仍然在alpha中,所以包没有像标准grpcio那样预编译。

UPDATE2:复制步骤

我刚刚在这里打开了一个问题:https://github.com/grpc/grpc/issues/12992和我正在这里复制复制步骤以便完成。

似乎grpci反射包安装取决于同一命令行中的其他包而冻结。

这可以很容易地由这两个码头不同的集装箱复制:

Dockerfile.fast -容器创建时间~1m 23s

代码语言:javascript
复制
#Download base ubuntu image
FROM ubuntu:16.04
RUN apt-get update && \
    apt-get -y install ca-certificates curl

# Prepare pip 
RUN apt-get -y install python-pip
RUN pip install -U pip
RUN pip install grpcio grpcio-tools
RUN pip install grpcio-reflection         # Two lines is FAST

Dockerfile.slow -容器创建时间5米20

代码语言:javascript
复制
#Download base ubuntu image
FROM ubuntu:16.04
RUN apt-get update && \
    apt-get -y install ca-certificates curl

# Prepare pip
RUN apt-get -y install python-pip
RUN pip install -U pip
RUN pip install grpcio grpcio-tools grpcio-reflection  # Single line is SLOW

定时容器构建时间:

代码语言:javascript
复制
time docker build --rm --no-cache -f Dockerfile.fast -t repro_reflbug_fast:latest .
......
real    1m22.295s
user    0m0.060s
sys     0m0.040s

time docker build --rm --no-cache -f Dockerfile.slow -t repro_reflbug_slow:latest .
.....
real    6m28.290s
user    0m0.052s
sys     0m0.052s
.....

我还没有时间调查,但第二起案件阻碍了很长一段时间,而第一起案件没有。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-10-16 17:54:14

事实证明,此问题在相应的GitHub回购中被接受为有效。目前正在讨论这一问题:

https://github.com/grpc/grpc/issues/12992

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46686476

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档