Configuration
Environment Variables
DENKFLOW_DATA_DIRECTORY
- Specifies the directory where DENKflow stores license state information, the TensorRT engine cache and other persistent data.
- The default location depends on the operating system:
| Platform | Value | Example |
|---|---|---|
| Linux | $XDG_CONFIG_HOME or $HOME/.config | /home/alice/.config |
| macOS | $HOME/Library/Application Support | /Users/Alice/Library/Application Support |
| Windows | {FOLDERID_RoamingAppData} | C:/Users/Alice/AppData/Roaming |
- Important: It is crucial to set this to a persistent location, especially when:
- Running inside Docker containers to avoid losing state across restarts
- Using
OneTimeLicenseSourceto preserve the offline license activation - Using TensorRT acceleration to avoid rebuilding the cache on every run
Example (Linux):
To set an environment variable for the current terminal session you can use:
export DENKFLOW_DATA_DIRECTORY=/path/to/persistent/denkflow_data
- Python
Inside a Python script you can use:
import os
os.environ['DENKFLOW_DATA_DIRECTORY'] = '/path/to/persistent/denkflow_data'
import denkflow
Running inside of a Docker Container
To properly store persistent data, some volumes need to be mounted when running the DENKflow API inside of a docker container.
- Generic Linux
- NVIDIA Jetson
The mounted volumes must contain the following entries:
/etc/machine-id:/etc/machine-id
DIRECTORY_ON_PARENT_SYSTEM:~/.config/denkflow
The mounted volumes must contain the following entries:
/dev/i2c-0:/dev/i2c-0
DIRECTORY_ON_PARENT_SYSTEM:~/.config/denkflow