import uvicorn
import torch

from app.common.redis_cli import redis_conn
from app.application.app import my_app


if __name__ == '__main__':
    # 在主线程初始化cuda
    is_gpu = torch.cuda.is_available()
    redis_conn.set('is_gpu', str(is_gpu))
    uvicorn.run("main:my_app", host='0.0.0.0', port=8080, reload=False)
