【问题标题】:Google Cloud Build fails due to missing CMake由于缺少 CMake,Google Cloud Build 失败
【发布时间】:2021-07-12 15:41:40
【问题描述】:

我正在尝试将 Flask/ML 应用部署到 Google Cloud,但遇到了这个问题;

当我尝试使用 requirements.txt 文件运行 gcloud builds submit --tag gcr.io/project-name/index 时,它会抛出 CMake must be installed to build dlib。从现在开始,我在使用 dlib 时没有任何问题(我已经安装了 cmake 和 build-essential),当我通过 ssh 连接 Google Cloud Shell 时,我可以看到 build-essential 和 cmake 都已安装并且是最新的那里也有。

我尝试在 Ubuntu 和 Windows 机器上构建,同样的错误。

【问题讨论】:

    标签: google-cloud-platform cmake gcloud


    【解决方案1】:

    解决了! CMake 需要在 Dockerfile 中构建,而不是在本地或云 shell 中。

    在 Dockerfile 中的 RUN pip install -r requirements.txt 之前添加 RUN apt-get update && apt-get -y install cmake 解决了该问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-06-02
      • 1970-01-01
      • 2021-11-17
      • 2014-02-25
      • 2011-12-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多