attribute 字段名规范
This commit is contained in:
45
README.md
45
README.md
@@ -1,45 +0,0 @@
|
||||
文件解释
|
||||
-----------
|
||||
|
||||
样例包括:
|
||||
|
||||
* README.md - 本文件
|
||||
* Dockerfile - 用以自动构建 Docker 镜像的脚本
|
||||
* requirements.txt - 依赖包文件
|
||||
* main.py - 主 Flask 服务器端源代码
|
||||
* python-version : 3.9
|
||||
|
||||
快速开始
|
||||
---------------
|
||||
|
||||
如下这些引导,假定你想在自己的电脑上开发本项目。
|
||||
|
||||
1. 安装依赖
|
||||
|
||||
$ conda create -n trinity_client_mixi python=3.9 -y
|
||||
$ conda activate trinity_client_mixi
|
||||
$ pip install -r requirements.txt
|
||||
$ conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia -y
|
||||
$ pip install mmcv==1.4.2 -f https://download.openmmlab.com/mmcv/dist/cu117/torch1.13/index.html
|
||||
|
||||
|
||||
2. 启动服务器
|
||||
|
||||
$ uvicorn app.main:app --host 0.0.0.0 --port 8000
|
||||
|
||||
3. 打开 http://127.0.0.1:8000/docs
|
||||
|
||||
Docker 部署
|
||||
---------------
|
||||
1. 构建镜像
|
||||
|
||||
$ cd {workspace}
|
||||
$ docker build -t trinity_client_mixi
|
||||
|
||||
2. 使用docker-compose 启动
|
||||
|
||||
$ docker-compose up -d
|
||||
|
||||
3. 查看日志
|
||||
|
||||
$ docker-compose logs -f
|
||||
Reference in New Issue
Block a user