OAK Apps Overview
OAK Apps let you develop, containerize, deploy and manage containerized vision apps across Luxonis OAK devices, from single units to fleets.They run on the preinstalled oak-agent service on OAK4 devices (part of Luxonis OS), so you can start deploying right away.
What are OAK Apps?
- Consistent development environment - Build once, deploy anywhere
- Simplified deployment - Package everything your app needs
- Fleet management - Deploy to multiple devices simultaneously
- Integration with Luxonis Hub - Monitor and manage devices remotely
.oakapp file is generated) you can move and install it to other devices as well without needing to rebuild or require an internet connection.Default Application Demo
See a prebuilt Default Application to preview what a finished OAK App can look like.
View on GitHub
Creating Your OAK App
Project Structure
App Development
Project Structure
A basic OAK App project structure:The
Text
1my-oak-app/
2├── .oakappignore # (Optional) Files to ignore when building the app on the device
3├── main.py # Your primary application code
4├── requirements.txt # Python dependencies
5└── oakapp.toml # App configurationoakapp.toml file is required and contains app metadata and build instructions.Deploying with oakctl
oakctl is a command-line tool that allows you to interact with your OAK4 cameras. It can be used to create, deploy, and manage apps on devices that are running the oak-agent service.Linux/MacOS
Windows
Linux/MacOS
On 64bit system, run:
Command Line
1bash -c "$(curl -fsSL https://oakctl-releases.luxonis.com/oakctl-installer.sh)"OS Compatibility Chart
| RVC4 OS version | oakctl version | Command |
|---|---|---|
| OS 1.14.1+ | 0.11.0+ | oakctl self-update (current stable) |
| OS 1.11 | 0.9.0 | oakctl self-update -v 0.9.0 |
| OS 1.8 | 0.4.2 | oakctl self-update -v 0.4.2 |
| OS 1.6 | 0.2.11 | oakctl self-update -v 0.2.11 |
Building and Running Apps
Command Line
1# Run an app directly from source
2oakctl app run ./my-oak-app
3
4# Build the app into a distributable package
5oakctl app build ./my-oak-app
6
7# Install a built app
8oakctl app install my-oak-app.oakappApp Management
Command Line
1# List installed apps
2oakctl app list
3
4# Start an app
5oakctl app start <container-id>
6
7# View app logs
8oakctl app logs <container-id>
9
10# Stop an app
11oakctl app stop <container-id>
12
13# Enable auto-start
14oakctl app enable <container-id>Device Management
Command Line
1# List connected devices
2oakctl list
3
4# Connect to a specific device
5oakctl connect <device-ip>The oakapp.toml Configuration
oakapp.toml file defines your app's build and runtime configuration:Toml
1# (Required) App Identifier
2identifier = "com.luxonis.python_demo"
3# (Required) App Entrypoint
4entrypoint = ["bash", "-c", "python3 /app/main.py"]
5
6# (Optional) Prepare container commands
7# Here is the place where you can install all the dependencies that are needed at run-time
8prepare_container = [
9 { type = "COPY", source = "requirements.txt", target = "requirements.txt" },
10 { type = "RUN", command = "apt-get update" },
11 { type = "RUN", command = "apt-get install -y python3-pip" },
12 { type = "RUN", command = "pip3 install -r /app/requirements.txt --break-system-packages" },
13]
14
15# (Optional) Prepare build dependencies
16# Here is the place where you can install all the dependencies that are needed at build-time
17prepare_build_container = [
18 # Example: npm, gcc, ...
19]
20
21# (Optional) Additional commands after all the app files are copied to the container
22build_steps = []