Skip to content

Commit

Permalink
Merge pull request Zeyi-Lin#36 from malobaidan/docker-compose
Browse files Browse the repository at this point in the history
updated redme
  • Loading branch information
Zeyi-Lin authored Sep 4, 2024
2 parents 0d5a59d + 198c446 commit 7b7efba
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,20 @@ You can access it locally at [http://127.0.0.1:7860](http://127.0.0.1:7860/).
docker run -p 8080:8080 hivision_idphotos python3 deploy_api.py
```

for docker compose:

After ensuring that the model weight file [hivision_modnet.onnx](https://github.com/Zeyi-Lin/HivisionIDPhotos/releases/tag/pretrained-model) is placed in the root directory, execute in the root directory:

```bash
docker compose build
```

After the image is packaged, run the following command to start the API service:

```bash
docker compose up -d
```

<br>

# 📖 Reference Projects
Expand Down
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: '3.8'

services:
hivision_idphotos:
build:
context: .
dockerfile: Dockerfile
image: hivision_idphotos
command: python3 deploy_api.py
ports:
- "8080:8080"
volumes:
- ./images:/app/images

volumes:
images:

0 comments on commit 7b7efba

Please sign in to comment.