Skip to content

Commit

Permalink
docs: docker pull
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeyi-Lin committed Sep 6, 2024
1 parent f222a42 commit 72942c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,19 +248,18 @@ print(response)

> 以下方式三选一
**方式一:拉取镜像**
**方式一:拉取最新镜像**

```bash
docker pull linzeyi/hivision_idphotos
docker tag linzeyi/hivision_idphotos hivision_idphotos
```

**方式二:Dockrfile 直接构建镜像:**

在确保将模型权重文件[hivision_modnet.onnx](https://github.com/Zeyi-Lin/HivisionIDPhotos/releases/tag/pretrained-model)放到`hivision/creator/weights`下后,在项目根目录执行:

```bash
docker build -t hivision_idphotos .
docker build -t linzeyi/hivision_idphotos .
```

**方式三:Docker compose 构建:**
Expand All @@ -278,13 +277,13 @@ docker compose build
运行下面的命令,在你的本地访问 [http://127.0.0.1:7860](http://127.0.0.1:7860/) 即可使用。

```bash
docker run -p 7860:7860 hivision_idphotos
docker run -p 7860:7860 linzeyi/hivision_idphotos
```

**启动 API 后端服务**

```bash
docker run -p 8080:8080 hivision_idphotos python3 deploy_api.py
docker run -p 8080:8080 linzeyi/hivision_idphotos python3 deploy_api.py
```

**两个服务同时启动**
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
build:
context: .
dockerfile: Dockerfile
image: hivision_idphotos
image: linzeyi/hivision_idphotos
command: python3 -u app.py --host 0.0.0.0 --port 7860
ports:
- '7860:7860'
Expand All @@ -14,7 +14,7 @@ services:
build:
context: .
dockerfile: Dockerfile
image: hivision_idphotos
image: linzeyi/hivision_idphotos
command: python3 deploy_api.py
ports:
- '8080:8080'

0 comments on commit 72942c7

Please sign in to comment.