gcpでpythonを実行するとエラーが出る

実現したいこと

gcpでpythonで画像生成

前提

エラー起きますですが調べてみると
このエラーが原因なわけではないそうです。
だけ実行してもエラーが起きます

発生している問題・エラーメッセージ

Could not create or update Cloud Run service looped, Container Healthcheck failed. Revision '****' is not ready and cannot serve traffic. The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable. Logs for this revision might contain more information. Logs URL: https://console.cloud.google.com/logs/viewer?project=****&resource=cloud_run_revision/service_name/****/revision_name/****qip&advancedFilter=resource.type**** For more troubleshooting guidance, see https://cloud.google.com/run/docs/troubleshooting#container-failed-to-start

該当のソースコード

python

1import torch 2from torch import autocast 3from diffusers import StableDiffusionPipeline 4from PIL import Image 5import numpy as np 6import cv2 7import base64 8import requests 9color = []10i = "i"11def main():12 print("")13 return "ok"14hugging_token = '****'15ldm = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4",variant="fp16",use_auth_token=hugging_token).to("cpu")16image = ldm(i, height=560, width=560, num_inference_steps=10).images[0]

試したこと

ログを見ると
0%| | 0/10 [00:00<?, ?it/s][W NNPACK.cpp:79] Could not initialize NNPACK! Reason: Unsupported hardware.
という初期化のところでずっと止まっておりここでエラーが起きます。
またまた調べてみるとgcpで同じエラーが起きている人がいましたですがどれも
解決できている人がいなかったのでここに来ました

補足情報(FW/ツールのバージョンなど)

requirements.txt

1-f https://download.pytorch.org/whl/torch_stable.html 2torch==1.10.2+cpu 3torchvision==0.11.3+cpu 4torchaudio==0.10.2+cpu 5openmim 6diffusers 7transformers 8scipy 9ftfy 10opencv-contrib-python 11Pillow 12numpy 13accelerate

コメントを投稿

0 コメント