CLI application based on SourceAFIS for comparing fingerprint templates.
To build a native CLI binary on MacOS, you will need GraalVM >= 22 from Oracle. Follow GraalVM Installation on macOS Platforms instructions to install it. For example:
wget https://download.oracle.com/graalvm/22/latest/graalvm-jdk-22_macos-aarch64_bin.tar.gz
tar -xzf graalvm-jdk-22_macos-aarch64_bin.tar.gz
# Note, you may download a newer minor version; alter the commands below accordingly
sudo mv graalvm-jdk-22.0.2+9.1 /Library/Java/JavaVirtualMachines
rm graalvm-jdk-22_macos-aarch64_bin.tar.gz
Add to .envrc
and run direnv allow
to set the environment variables:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/graalvm-jdk-22.0.2+9.1/Contents/Home
export PATH=$JAVA_HOME/bin:$PATH
export GRAALVM_HOME=$JAVA_HOME
If you don't need to compile a native binary, you can use Jabba as a JVM manager to install GraalVM:
# use Jabba to install GraalVM
jabba ls-remote | grep graalvm | grep 21
jabba install [email protected]
Add to .envrc
and run direnv allow
to set the environment variables:
source ~/.jabba/jabba.sh
export [email protected]
export JAVA_HOME=$(jabba which $JABBA_VM)/Contents/Home
export PATH=$JAVA_HOME/bin:$PATH
export GRAALVM_HOME=$JAVA_HOME
Install the native-image
utility using the Graal updater.
gu available
gu install native-image
./gradlew clean
./gradlew build
./run.sh --file-name=thumbprints.csv --thread-count=14 --output-score-limit=40 --subject-limit=1000
./gradlew clean
./gradlew uberJar
java -cp build/libs/kafis.jar com.smartelect.AppKt --file-name=thumbprints.csv --thread-count=14 --output-score-limit=40 --subject-limit=1000
./gradlew build
./gradlew buildNativeImage
cd build/
./kafis --file-name=thumbprints.csv --thread-count=14 --output-score-limit=40
docker build . -t kafis:latest
docker run \
--mount=type=bind,source=${PWD}/thumbprints.csv,target=/app/thumbprints.csv \
kafis:latest -- \
java -cp /app/kafis.jar com.smartelect.AppKt \
--file-name=/app/thumbprints.csv \
--thread-count=14 \
--output-score-limit=40 \
--subject-limit=2000
Caktus Consulting Group, LLC
Thanks to @lreimer for the hands-on-clikt template used to start this repository.
This software is provided under the MIT open source license, read the LICENSE
file for details.