简体   繁体   English

Google Cloud Run Second Flask 应用程序 - requirements.txt 问题

[英]Google Cloud Run Second Flask Application - requirements.txt issue

I have a google cloud run flask application named "HelloWorld1" already up and running however i need to create a second flask application.我有一个名为“HelloWorld1”的谷歌云运行 flask 应用程序已经启动并正在运行,但是我需要创建第二个 flask 应用程序。 I followed the below steps as per documentation: 1- On "Cloud Shell Editor" clicked "<>Cloud Code" --> "New Application" --> "Cloud Run Application Basic Cloud Run Application.."-->"Python (Flask): Cloud Run", provide and new folder and application is created.我按照文档执行了以下步骤:1-在“Cloud Shell Editor”上单击“<>Cloud Code”-->“New Application”-->“Cloud Run Application Basic Cloud Run Application..”-->“Python (Flask):Cloud Run”,提供并创建新文件夹和应用程序。

2- When i try to run it using "Run on Cloud Run Emulator" i get the following error: 2- 当我尝试使用“Run on Cloud Run Emulator”运行它时,出现以下错误:

Starting to run the app using configuration 'Cloud Run: Run/Debug Locally' from .vscode/launch.json...
To view more detailed logs, go to Output channel : "Cloud Run: Run/Debug Locally - Detailed"
Dependency check started
Dependency check succeeded
Starting minikube, this may take a while...................................
minikube successfully started
The minikube profile 'cloud-run-dev-internal' has been scheduled to stop automatically after exiting Cloud Code. To disable this on future deployments, set autoStop to false in your launch configuration /home/mian/newapp/.vscode/launch.json
Update initiated
Update failed with error code DEVINIT_REGISTER_BUILD_DEPS
listing files: file pattern [requirements.txt] must match at least one file
Skaffold exited with code 1.
Cleaning up...
Finished clean up.

I tried following:我试过以下:

1- tried to create different type of application eg django instead of flask however always getting the same error 2- tried to give full path of [requirements.txt] in docker settings, no luck. 1- 尝试创建不同类型的应用程序,例如 django 而不是 flask,但总是出现相同的错误 2- 尝试在 docker 设置中提供 [requirements.txt] 的完整路径,但没有成功。

Please if someone help me understanding why i am not able to run a second cloud run Flask app due to this error?请有人帮助我理解为什么由于此错误我无法运行第二个云运行 Flask 应用程序?

It's likely that your Dockerfile references the 'requirements.txt' file, but that file is not in your local directory.您的 Dockerfile 可能引用了“requirements.txt”文件,但该文件不在您的本地目录中。 So, it gives the error that it's missing:所以,它给出了它丢失的错误:

listing files: file pattern [requirements.txt] must match at least one file列出文件:文件模式 [requirements.txt] 必须至少匹配一个文件

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将 requirements.txt 传递给 Google Cloud Pyspark 批处理作业 - Passing requirements.txt to Google Cloud Pyspark Batch Job Cloud Functions 部署 requirements.txt 失败 - Cloud Functions deployment requirements.txt failing 如何在apache airflow DAG中运行独立requirements.txt文件 - How to run independent requirements.txt file in apache airflow DAG GAE Python - 我的 requirements.txt 上的库未安装 - GAE Python - libs on my requirements.txt are not installed 如何解决 Django 部署中 requirements.txt 文件中的依赖冲突 - How to solve dependency conflicts in requirements.txt file in Django deployment Google Cloud Run 中 Flask 应用程序的 Celery 任务 - Celery Tasks for Flask App in Google Cloud Run 错误:无法打开需求文件:[Errno 2] 没有这样的文件或目录:'requirements.txt' 使用 AWS Lambda 和 Python 时 - ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt' When using AWS Lambda and Python Cloud Run 上的 Flask web 应用程序 - google.auth.exceptions.DefaultCredentialsError: - Flask web app on Cloud Run - google.auth.exceptions.DefaultCredentialsError: 在 SageMaker 的处理过程中,在 source_dir 中使用 requirements.txt 重新打包推理 model 而无需安装它们 - Repack inference model with requirements.txt inside source_dir without installing them during the process in SageMaker Github 到 Google Cloud Run:Python Flask API 在 Google Cloud Run 上运行的 WSGI 给出“容器无法启动并侦听端口” - Github to Google Cloud Run: Python Flask API WSGI running on Google Cloud Run gives "Container failed to start and listen on the port"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM