Google app engine [GCP][App Engine]Streamlight web应用部署-容器崩溃

Google app engine [GCP][App Engine]Streamlight web应用部署-容器崩溃,google-app-engine,google-cloud-platform,deployment,streamlit,Google App Engine,Google Cloud Platform,Deployment,Streamlit,我正在尝试部署一个在谷歌应用程序引擎上使用Streamlight开发的web应用程序。当部署过程接近完成时。我得到了以下错误: ERROR: (gcloud.app.deploy) Error Response: [9] Application startup error! Code: APP_CONTAINER_CRASHED You can now view your Streamlit app in your browser. Network URL: http://172.1

我正在尝试部署一个在谷歌应用程序引擎上使用Streamlight开发的web应用程序。当部署过程接近完成时。我得到了以下错误:

ERROR: (gcloud.app.deploy) Error Response: [9]
Application startup error! Code: APP_CONTAINER_CRASHED

  You can now view your Streamlit app in your browser.

  Network URL: http://172.17.0.6:8080
  External URL: http://34.67.15.189:8080

Killed
我无法理解这个错误的根本原因。如有任何建议和/或帮助,将不胜感激

编辑:

我使用灵活的环境。app.yaml如下所示:

runtime: custom
env: flex

runtime_config:
  python_version: 3

manual_scaling:
  instances: 1
resources:
  cpu: 1
  memory_gb: 5
  disk_size_gb: 25
FROM python:3.7

# Copy local code to the container image.
WORKDIR /app
COPY requirements.txt ./requirements.txt

# Install dependencies.
RUN pip3 install -r requirements.txt

EXPOSE 8080

COPY . /app

# Run the web service on container startup.
CMD streamlit run --server.port 8080 --server.enableCORS false app.py
Dockerfile如下所示:

runtime: custom
env: flex

runtime_config:
  python_version: 3

manual_scaling:
  instances: 1
resources:
  cpu: 1
  memory_gb: 5
  disk_size_gb: 25
FROM python:3.7

# Copy local code to the container image.
WORKDIR /app
COPY requirements.txt ./requirements.txt

# Install dependencies.
RUN pip3 install -r requirements.txt

EXPOSE 8080

COPY . /app

# Run the web service on container startup.
CMD streamlit run --server.port 8080 --server.enableCORS false app.py
而且,这些要求是:

pandas==0.24.2
scikit_learn==0.23.1
streamlit==0.62.1
我使用了和您的配置文件,我注意到您正在定义
运行时配置
,这是不必要的,因为您在Dockerfile中选择了通用python docker映像,这仅适用于应用程序引擎的python映像

有关自定义运行时的更多信息,请检查此项

在对您的文件进行一些修改后,所有这些都将使用示例应用程序运行,请随意使用这些文件作为起始点

这是我的文件夹结构

./
├── app.py
├── app.yaml
├── Dockerfile
└── requirements.txt

这是我的应用程序

runtime: custom
env: flex

manual_scaling:
  instances: 1

resources:
  cpu: 4
  memory_gb: 5
  disk_size_gb: 25

这是我的文件

FROM python:3.7

# Copy local code to the container image.
WORKDIR /app
COPY requirements.txt ./requirements.txt

# Install dependencies.
RUN pip3 install -r requirements.txt

EXPOSE 8080

COPY . /app

# Run the web service on container startup.
CMD streamlit run --server.port 8080 --server.enableCORS false /app/app.py


您的应用程序在本地运行吗?共享应用程序的app.yaml文件,如果您正在使用app Engine Flexible with Custom Runtime,则共享您正在使用的Docker映像。@DanielOcando:感谢您的快速响应。我用
app.yaml
Dockerfile
requirements.txt
编辑了这个问题。你能将我重定向到任何参考或文档以在本地检查它(使用Dockerfile文件)吗?首先,在本地测试应用程序,看看它是否工作正常。我知道您的应用程序使用Streamlight。因此,您应该测试。之后,您应该检查日志并查看是否存在任何问题。请注意,使用streamlit将需要Dockerfile具有所述的附加配置。如果应用程序在本地工作,然后在容器级别工作,然后,您可以考虑运行<代码> G云中应用程序部署——VBusie= Debug G/<代码>以检查部署过程中的其他问题。谢谢:)我的应用程序有一个CSV文件,在执行过程中需要访问,我把它放在同一个文件夹中。可以吗?@Dhanya如果你的python应用程序可以访问它,那么很好。docker在Google应用程序引擎上的文件大小有限制吗。我正在尝试为另一个应用程序重新创建相同的应用程序。它由一个大小约为1GB的文件组成。