用pip安装grpcio-reflection需要很长时间。
这是很奇怪的,因为pip包在PyPI中只有8KB,但是下载需要超过一分钟,而其他以兆字节为单位的包的下载速度非常快。
更新:它没有下载,有大量的编译正在进行。它似乎仍然在alpha中,所以包没有像标准grpcio那样预编译。
UPDATE2:复制步骤
我刚刚在这里打开了一个问题:https://github.com/grpc/grpc/issues/12992和我正在这里复制复制步骤以便完成。
似乎grpci反射包安装取决于同一命令行中的其他包而冻结。
这可以很容易地由这两个码头不同的集装箱复制:
Dockerfile.fast -容器创建时间~1m 23s
#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 FASTDockerfile.slow -容器创建时间5米20
#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定时容器构建时间:
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
.....我还没有时间调查,但第二起案件阻碍了很长一段时间,而第一起案件没有。
发布于 2017-10-16 17:54:14
事实证明,此问题在相应的GitHub回购中被接受为有效。目前正在讨论这一问题:
https://stackoverflow.com/questions/46686476
复制相似问题