diff --git a/README_EN.md b/README_EN.md index 96c71f97..6d7272d9 100644 --- a/README_EN.md +++ b/README_EN.md @@ -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 +``` +
# 📖 Reference Projects diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..77002c24 --- /dev/null +++ b/docker-compose.yml @@ -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: