Overview
Before installing Iris, ensure your system meets the following requirements. Iris is built with Rust and leverages OpenCV for high-performance face detection and recognition, requiring specific system-level dependencies.System Requirements
CPU
Modern x86_64 or ARM64 processor2+ cores recommended for production
Memory
Minimum 2GB RAM4GB+ recommended for concurrent requests
Storage
500MB for dependencies and modelsAdditional space for build artifacts
Network
Internet connection requiredFor model downloads and image fetching
Required Dependencies
Rust Toolchain
Iris requires Rust 2021 edition or later. Install via rustup:Install rustup
Download and install the official Rust toolchain manager:Follow the on-screen prompts to complete installation.
Iris uses Cargo.toml edition = “2021”. Ensure your Rust version supports this edition (Rust 1.56+).
OpenCV 4.x
OpenCV is the core computer vision library that powers Iris’s face detection and recognition capabilities. Version 4.x is required.- macOS
- Linux (Ubuntu/Debian)
- Linux (Fedora/RHEL)
- Windows
Install OpenCV via Homebrew:Verify installation:
Build Tools
Additional build dependencies required for compilation:LLVM and Clang
LLVM and Clang
Required for opencv-rust bindings generation.macOS:Linux:Verify:
pkg-config
pkg-config
Used to locate library paths during compilation.macOS:Linux:Verify:
curl
curl
Required for downloading AI models via setup script.macOS/Linux:Install if missing (Linux):
Rust Dependencies
Iris uses the following Rust crates (automatically installed via Cargo):Cargo.toml
These dependencies will be automatically fetched when you run
cargo build. No manual installation required.AI Models
Iris requires two ONNX models from OpenCV Zoo:YuNet (Face Detection)
File:
face_detection_yunet_2023mar.onnxSize: ~360KBPurpose: Detects faces in imagesSFace (Face Recognition)
File:
face_recognition_sface_2021dec.onnxSize: ~41MBPurpose: Generates 128-dimensional face embeddingsNetwork Requirements
Port Availability
Ensure port 8080 is available for the API server:Firewall Configuration
If running in production, configure your firewall to allow:- Inbound: TCP port 8080 (or your configured port)
- Outbound: HTTPS (443) for downloading models and fetching images
Optional: Docker
If you prefer containerized deployment, ensure Docker is installed:Verification Checklist
Before proceeding to installation, verify all prerequisites:All prerequisites met? Proceed to Installation to set up Iris.
Troubleshooting
opencv-rust compilation fails
opencv-rust compilation fails
Symptoms: Errors during
cargo build related to OpenCV bindings.Solutions:- Verify OpenCV 4.x is installed:
pkg-config --modversion opencv4 - Ensure LLVM/Clang is installed:
clang --version - Set pkg-config path manually:
- Check opencv-rust troubleshooting: https://github.com/twistedfall/opencv-rust#troubleshooting
Rust installation issues
Rust installation issues
Symptoms:
rustc or cargo commands not found.Solutions:- Reload shell configuration:
source $HOME/.cargo/env - Add to ~/.bashrc or ~/.zshrc:
- Reinstall rustup: https://rustup.rs/
Port 8080 already in use
Port 8080 already in use
Symptoms: “Address already in use” error when starting Iris.Solutions:
- Find the process using the port:
- Kill the process or change Iris’s port in
main.rs:151:
Next Steps
Installation Guide
Clone the repository and download AI models
Docker Setup
Alternative containerized deployment