Skip to content

Commit

Permalink
Merge pull request #930 from dfinity/ulan/face-recognition
Browse files Browse the repository at this point in the history
Add a face recognition example
  • Loading branch information
ulan authored Jul 15, 2024
2 parents d04fc2b + 71bd77a commit 08ea0b2
Show file tree
Hide file tree
Showing 43 changed files with 8,850 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
/rust/dip721-nft-container/ @dfinity/sdk
/rust/encrypted-notes-dapp-vetkd/ @dfinity/dept-crypto-library
/rust/encrypted-notes-dapp/ @dfinity/dept-crypto-library
/rust/face-recognition/ @dfinity/runtime
/rust/guards/ @dfinity/cross-chain-team
/rust/hello/ @dfinity/sdk
/rust/icp_transfer/ @dfinity/growth
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/rust-face-recognition-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: rust-face-recognition
on:
push:
branches:
- master
pull_request:
paths:
- rust/face-recognition/**
- .github/workflows/provision-darwin.sh
- .github/workflows/provision-linux.sh
- .github/workflows/rust-face-recognition-example.yaml
- .ic-commit
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
rust-face-recognition-example-darwin:
runs-on: macos-12
steps:
- uses: actions/checkout@v1
- name: Provision Darwin
run: DFX_VERSION="0.20.2-beta.0" bash .github/workflows/provision-darwin.sh
- name: Remove networks.json
run: rm -f ~/.config/dfx/networks.json
- name: Rust Face Recognition Darwin
run: |
dfxvm install 0.22.0-beta.0
dfx start --background
pushd rust/face-recognition
npm install
dfx deploy --yes
popd
rust-face-recognition-example-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Provision Linux
run: DFX_VERSION="0.20.2-beta.0" bash .github/workflows/provision-linux.sh
- name: Remove networks.json
run: rm -f ~/.config/dfx/networks.json
- name: Rust Face Recognition Linux
run: |
dfxvm install 0.22.0-beta.0
dfx start --background
pushd rust/face-recognition
npm install
dfx deploy --yes
popd
5 changes: 5 additions & 0 deletions rust/face-recognition/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[build]
target = ["wasm32-wasi"]

[target.wasm32-wasi]
rustflags = ["-Ctarget-feature=+simd128"]
13 changes: 13 additions & 0 deletions rust/face-recognition/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.dfx/
build/
node_modules/
dist/
.DS_Store
_MACOSX
.vscode/
target/
*.old.did
.idea
src/backend/assets/version-RFB-320.onnx
src/backend/assets/facerec.onnx
.env
Loading

0 comments on commit 08ea0b2

Please sign in to comment.