-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
152 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# This file was automatically generated. | ||
# Please, do not edit it manually. | ||
|
||
name: Build Docker Image develop | ||
|
||
on: | ||
release: | ||
types: | ||
- prereleased | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
environment: develop | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: 'Az CLI login' | ||
uses: azure/login@v1 | ||
with: | ||
client-id: ${{ secrets.AZURE_CLIENT_ID }} | ||
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | ||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | ||
|
||
- name: 'Login to ACR' | ||
run: | | ||
az acr login --name ${{ vars.DOCKER_REGISTRY }} | ||
- name: 'Build & push image' | ||
run: | | ||
docker build -t ${{ vars.DOCKER_REGISTRY }}/face-recognition:develop . | ||
docker push ${{ vars.DOCKER_REGISTRY }}/face-recognition:develop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# This file was automatically generated. | ||
# Please, do not edit it manually. | ||
|
||
name: Build Docker Image production | ||
|
||
on: | ||
release: | ||
types: | ||
- released | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
environment: production | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: 'Az CLI login' | ||
uses: azure/login@v1 | ||
with: | ||
client-id: ${{ secrets.AZURE_CLIENT_ID }} | ||
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | ||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | ||
|
||
- name: 'Login to ACR' | ||
run: | | ||
az acr login --name ${{ vars.DOCKER_REGISTRY }} | ||
- name: 'Build & push image' | ||
run: | | ||
docker build -t ${{ vars.DOCKER_REGISTRY }}/face-recognition:production . | ||
docker push ${{ vars.DOCKER_REGISTRY }}/face-recognition:production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2021-2024 Avaiga Private Limited | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations under the License. | ||
|
||
FROM python:3.11 | ||
|
||
WORKDIR /app | ||
|
||
# Install application dependencies. | ||
COPY src/requirements.txt . | ||
RUN pip install -r requirements.txt | ||
|
||
# Copy the application source code. | ||
COPY src . | ||
|
||
CMD ["taipy", "run", "--no-debug", "--no-reloader", "main.py", "-H", "0.0.0.0", "-P", "5000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
gmarabout | ||
FlorianJacta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,29 +9,46 @@ To install this demo: | |
|
||
``` | ||
git clone [email protected]:Avaiga/demo-demo-face-recognition.git | ||
cd demo-face-recognition | ||
cd demo-face-recognition/src | ||
``` | ||
|
||
To install the dependencies: | ||
``` | ||
pipenv install | ||
pip install -r requirements.txt | ||
``` | ||
|
||
or, if you want to develop in the demo: | ||
## Building the Webam component | ||
|
||
- Clone the taipy-2-2 branch to build the front-end JavaScript, | ||
|
||
``` | ||
pip install taipy==2.2 | ||
pip install opencv-python-headless==4.7.0.72 | ||
pip install opencv-contrib-python-headless==4.7.0.72 | ||
pip install pillow | ||
``` | ||
|
||
- Run this command: | ||
|
||
``` | ||
cd demo-face-recognition/webcam/webui | ||
npm i | ||
``` | ||
|
||
- Find the location of taipy-gui with the `find_taipy_gui_dir.py` script and run: | ||
|
||
``` | ||
pipenv install --dev | ||
npm i <path to taipy-gui> | ||
``` | ||
|
||
Then you need to build the front-end JavaScript: | ||
- Change `webpack.config.js` with taipy-gui path and run: | ||
|
||
``` | ||
cd taipy-demo-face-recognition/webcam/webui | ||
npm install | ||
npm build | ||
npm run build | ||
``` | ||
|
||
|
||
And finally, to run the demo: | ||
Finally, to run the demo: | ||
``` | ||
pipenv run python main.py | ||
python main.py | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters