我有一个使用Consumption Plan创建的Python函数应用程序。我尝试使用VS代码函数应用程序扩展部署一个使用tensorflow
的应用程序。但是Deploy to Function App
在将tensorflow
添加到requirements.txt时失败。我收到以下错误:
collecting tensorflow
6:04:44 am PostComparisonApp: [00:34:44+0000] Downloading tensorflow-2.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (578.1 MB)
6:05:10 am PostComparisonApp: Done in 27 sec(s).
6:05:14 am PostComparisonApp: /opt/Kudu/Scripts/starter.sh oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.9.7 -p packagedir=.python_packages/lib/site-packages
6:05:14 am PostComparisonApp: Generating summary of Oryx build
6:05:14 am PostComparisonApp: Deployment Log file does not exist in /tmp/oryx-build.log
6:05:14 am PostComparisonApp: The logfile at /tmp/oryx-build.log is empty. Unable to fetch the summary of build
6:05:14 am PostComparisonApp: Deployment Failed. deployer = Push-Deployer deploymentPath = Functions App ZipDeploy. Extract zip. Remote build.
6:05:26 am PostComparisonApp: Deployment failed.
我得到这个错误没有其他变化的templace函数,提供了在扩展中创建函数。我也尝试运行func azure functionapp publish
命令,以及,但得到同样的错误。我尝试删除应用程序,并创建新的,但仍然同样的错误。
2条答案
按热度按时间myzjeezk1#
tensorflow
添加到requirment.txt中。功能代码:
thtygnil2#
在尝试了很多不同的东西之后,我发现如果在requirements.txt中使用
tensorflow-cpu
而不是tensorflow
,它可以很好地部署。