【问题标题】:How to add pytorch library to Google App Engine如何将 pytorch 库添加到 Google App Engine
【发布时间】:2021-03-31 22:02:23
【问题描述】:

我正在尝试将 torch==1.7.0+cputorchvision==0.8.1+cpu 库添加到 GAE,

在我的操作系统中,我可以使用 pip install torch==1.7.0+cpu torchvision==0.8.1+cpu -f https://download.pytorch.org/whl/torch_stable.html 来安装它们,但在 google 应用引擎部署中,它只需要来自 requirements.txt 的库。

我尝试通过pip install torch==1.7.0+cpu torchvision==0.8.1+cpu -f https://download.pytorch.org/whl/torch_stable.html -t lib/将它们下载到lib文件夹并添加到appengine_config.py

from google.appengine.ext import vendor
vendor.add('lib')

但我不断收到 This deployment has too many files. New versions are limited to 10000 files for this app.

关于如何实现这一点的任何想法?

【问题讨论】:

    标签: python python-3.x google-app-engine google-cloud-platform pip


    【解决方案1】:

    我可以通过将requirements.txt 文件编辑为:

    -f https://download.pytorch.org/whl/torch_stable.html
    torch==1.7.0+cpu
    torchvision==0.8.1+cpu
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-10-12
      • 2016-07-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-08
      相关资源
      最近更新 更多