在我的 Windows 机器上使用 pip install grpcio 安装 grpcio 时出现错误。我在这里阅读 - https://github.com/grpc/grpc/issues/17829,这可能是由于 setuptools 版本中的错误。我将我的 setuptools 升级到最新版本,即 41.0.1 。仍然得到相同的构建错误。它不会发生在任何其他包中。我试过在我的笔记本电脑上重新安装 pip 和 python。我附上我的错误
Building wheels for collected packages: grpcio
Building wheel for grpcio (setup.py) ... error
ERROR: Complete output from command 'c:\python27\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'c:\\users\\s\\appdata\\local\\temp\\pip-install-ge5zhq\\grpcio\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel
-d 'c:\users\s\appdata\local\temp\pip-wheel-txjhlh' --python-tag cp27:
ERROR: Found cython-generated files...
running bdist_wheel
running build
running build_py
running build_project_metadata
creating python_build
creating python_build\lib.win-amd64-2.7
creating python_build\lib.win-amd64-2.7\grpc
copying src\python\grpcio\grpc\_auth.py -> python_build\lib.win-amd64-2.7\grpc
copying src\python\grpcio\grpc\_channel.py -> …Run Code Online (Sandbox Code Playgroud) 即使我的所有步骤都成功通过,Gitlab CI 显示了这一点 - “清理基于文件的变量 00:01 错误:作业失败:退出代码 1”
并最终失败了。同样有趣的是,这只发生在我的主分支上。它在其他分支上成功运行。有没有人遇到过这个问题并找到了解决方案?
- >
for dir in $(git log -m -1 --name-only -r --pretty="format:" "$CI_COMMIT_SHA"); do
if [[ -f "$dir" ]]; then
SERVICE=$(echo "$dir")
# helm install the service
fi
done
- echo "deployed"
Run Code Online (Sandbox Code Playgroud) 我有一个gitlab-ci.yml这样的:
build and push docker image:
stage: publish
variables:
DOCKER_REGISTRY: amazon-registry
AWS_DEFAULT_REGION: ap-south-1
APP_NAME: sample-app
DOCKER_HOST: tcp://docker:2375
image:
name: amazon/aws-cli
entrypoint: [""]
services:
- docker:dind
before_script:
- amazon-linux-extras install docker
script:
- docker build -t $DOCKER_REGISTRY/$APP_NAME:master .
- aws ecr get-login-password | docker login --username AWS --password-stdin $DOCKER_REGISTRY
- docker push $DOCKER_REGISTRY/$APP_NAME:master
Run Code Online (Sandbox Code Playgroud)
这一步需要 19=8 分钟才能完成,因为 docker 镜像步骤没有被缓存。我希望能够缓存 before_scriptamazon-linux-extras install docker以及我正在构建的 docker 映像。我们在自己的 gitlab runners 上运行。我已经搜索了答案,但找到了 4 年前的解决方案。有没有办法解决这个问题?另外,是否会放弃docker:dind帮助?