首页 > 解决方案 > 未能将 tensorflow==2.1.0 安装到 Cloud Functions 运行时 Python 3.7

问题描述

我正在尝试将 tensorflow 安装到 Google Cloud Functions 中,但无法部署如下错误。

protoPayload: {
  @type: "type.googleapis.com/google.cloud.audit.AuditLog"   
  authenticationInfo: {…}   
  methodName: "google.cloud.functions.v1.CloudFunctionsService.UpdateFunction"   
  requestMetadata: {…}   
  resourceName: "projects/xxxxxxxxxxxxxx/functions/analyzepy"   
  serviceName: "cloudfunctions.googleapis.com"   
  status: {
   code: 3    
   message: "INVALID_ARGUMENT"    
  }
 }

我所做的是;
添加tensorflow==2.1.0Requirements.txt
我的运行时是Python 3.7
Memory 256 MiB

请告知如何在 Cloud Functions 上安装 tensorflow。

谢谢!

标签: pythontensorflowgoogle-cloud-platformgoogle-cloud-functions

解决方案


推荐阅读