Environment Configuration

deployment configuration env

The application behavior is controlled by environment variables, managed via a .env file in the project root.

Variable Reference

VariableDescriptionDefault / Example
ONNX_CHECKPOINT_FILENAMEFilename of the .onnx model to load from models/.last-checkpoint-signs_502.pth.onnx
DOMAIN_NAMEAllowed origin for CORS and WebSocket connections.http://localhost:8000
LOCAL_DEVFlag to indicate local development environment. Affects data paths.1
USE_CPUForce PyTorch/ONNX to use CPU instead of CUDA.1
OMP_NUM_THREADSNumber of threads for OpenMP (Linear Algebra).1 (Container Default)

Setup

  1. Copy the example file:

    cp .env.example .env
  2. Edit .env to match your local setup.

Constants (src/core/constants.py)

Some configurations are hardcoded constants but can be influenced by environment flags:

  • MODELS_DIR: Directory for model checkpoints.
  • DATA_DIR: Root data directory.