Я успешно развернул приложение локально из среды conda, используя uvicorn main:app
, но когда я пытаюсь развернуть приложение на Google Cloud Platform, используя gcloud app deploy app.yaml
, я получаю сообщение об ошибке, которую трудно отладить. Вот что я получаю
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File "/env/lib/python3.6/site-packages/gunicorn/app/base.py", line 228, in run
super().run()
File "/env/lib/python3.6/site-packages/gunicorn/app/base.py", line 72, in run
Arbiter(self).run()
File "/env/lib/python3.6/site-packages/gunicorn/arbiter.py", line 229, in run
self.halt(reason=inst.reason, exit_status=inst.exit_status)
File "/env/lib/python3.6/site-packages/gunicorn/arbiter.py", line 342, in halt
0%| | 0/6892 [00:00<?, ?it/s]Skipping token 2519370 with 1-dimensional vector ['300']; likely a header
self.stop()
39%|███▉ | 1225/3132 [00:00<00:00, 2785.15it/s] File "/env/lib/python3.6/site-packages/gunicorn/arbiter.py", line 393, in stop
time.sleep(0.1)
File "/env/lib/python3.6/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
self.reap_workers()
File "/env/lib/python3.6/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
0%| | 0/7657 [00:00<?, ?it/s]Skipping token 2519370 with 1-dimensional vector ['300']; likely a header
56%|█████▌ | 1711/3045 [00:00<00:00, 3331.80it/s]:35, 705kB/s]
app.yaml
runtime: python
env: flex
runtime_config:
python_version: 3
resources:
cpu: 12
memory_gb: 72
disk_size_gb: 60
instance_class: F4_1G
entrypoint: gunicorn main:app -w 24 -k uvicorn.workers.UvicornWorker
requirements.txt
certifi
click
fastapi
gunicorn
h11
numpy
nltk
pandas
Pillow
pydantic
python-dateutil
pytz
six
starlette
torch
torchvision
uvicorn
websockets
wincertstore
pytorch-nlp
unidecode
google-cloud-storage