Skip to main content
Version: 0.8.x [Latest Beta]

Configuration

This page covers the runtime settings that matter most in deployments.

Environment variables at a glance

VariablePurposeDefault
DENKFLOW_DATA_DIRECTORYPersistent SDK state (offline license, TensorRT/OpenVINO cache).platform-default
ORT_DYLIB_PATHOverride ONNX Runtime shared-library auto-detection.auto-detected
DENKFLOW_ENABLE_ORT_LOGSEnable provider-level ONNX Runtime logging.unset (disabled)

DENKFLOW_DATA_DIRECTORY

DENKFLOW_DATA_DIRECTORY controls where the SDK stores persistent data such as:

  • offline license state
  • TensorRT engine cache
  • OpenVINO cache files
  • other runtime metadata

Default location

PlatformDefault location
Linux$XDG_CONFIG_HOME/denkflow or $HOME/.config/denkflow
macOS$HOME/Library/Application Support/denkflow
Windows%APPDATA%/Roaming/denkflow

Docker

You do not need to set DENKFLOW_DATA_DIRECTORY in the container if you mount a host directory onto the SDK default path inside the image (for example -v /srv/denkflow-data:/root/.config/denkflow when the process runs as root inside the docker, matching $HOME/.config/denkflow). Setting DENKFLOW_DATA_DIRECTORY is only necessary when you want data stored somewhere other than that default.

Linux example

export DENKFLOW_DATA_DIRECTORY=/opt/denkflow-data
mkdir -p "$DENKFLOW_DATA_DIRECTORY"

Windows example

$env:DENKFLOW_DATA_DIRECTORY = "C:\ProgramData\denkflow"
New-Item -ItemType Directory -Force -Path $env:DENKFLOW_DATA_DIRECTORY

ORT_DYLIB_PATH

Normally the SDK auto-detects the ONNX Runtime shared library. If that auto-detection fails, set ORT_DYLIB_PATH manually.

export ORT_DYLIB_PATH=/path/to/libonnxruntime.so
$env:ORT_DYLIB_PATH = "C:\path\to\onnxruntime.dll"

Use this if:

  • you ship a custom ONNX Runtime build
  • the runtime library is not in the expected package location
  • the DENKflow library throws an error saying the ONNX Runtime shared library cannot be found

Logging

SDK logs

import denkflow
denkflow.set_log_level("DEBUG")

The available log levels are (ordered by increasing verbosity): ERROR, WARN, INFO, DEBUG, and TRACE.

ONNX runtime logs

Enable ONNX Runtime logs if you need provider-level diagnostics:

export DENKFLOW_ENABLE_ORT_LOGS=true

Persistence in containers

Mount a persistent host directory onto the SDK default data directory inside the container (on Linux, typically /root/.config/denkflow when running as root, i.e. the same path as $HOME/.config/denkflow). That gives you persistent offline license state, TensorRT engines, and OpenVINO caches without setting DENKFLOW_DATA_DIRECTORY. Alternatively, mount your host directory anywhere you like and set DENKFLOW_DATA_DIRECTORY to that path inside the container.

Also pass /etc/machine-id through for stable licensing and authentication.

See Docker Deployment for full examples.