1.模型初始化放在gunicorn_config中
启动时加上 --preload,启动不报错,预测报错
启动时不加 --preload 直接报错
RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method
2.模型初始化放在flask app中
一切正常,除了每个worker会占用一份的显存
-
Notifications
You must be signed in to change notification settings - Fork 0
wqh17101/torch_serving_test
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
torch gunicorn
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published