Skip to content

API

The best way to deploy the REST API instance is to use Docker. Use the Dockerfile to build a minimal Docker image:

docker build \
  --build-arg GIT_COMMIT=$(git rev-parse --short HEAD) \
  --build-arg VERSION=$(git describe --always --dirty) \
  --build-arg BUILD_TIME=$(date -u +%Y-%m-%dT%H:%M:%SZ) \
  -t opencode.it4i.eu:5050/exa4mind/platform/aqis/query-inference/ai-inference-service:go-$(git rev-parse --short HEAD) .

Virtual machine setup

We recommend running the service in a virtual machine with minimum specs:

Operating System: Linux (any modern distribution) RAM: 4GB VCPUs: 2 VCPU Free disk space: 50GB

Running the container

Create .env file based on .env.example and fill in the credentials.

Mandatory environment variables to be set:

API_LOCAL_KEY
API_BIND_ADDR
DB_PATH
DAEMON_ENABLE
HEAPPE_URL
HEAPPE_CLIENT_HTTP2
HEAPPE_API_KEY
USERORG_ENABLE
USERORG_URL
USERORG_CACHE_EXPIRATION
USERORG_CACHE_CLEANUP_INTERVAL
USERORG_CLIENT_HTTP2
USERORG_CLIENT_TIMEOUT

The .env file is the one and only configuration when starting the API server. Everything else is managed by the HTTP API at runtime.

Start the docker container as such:

docker run 
  -v $(pwd)/data:/data 
  --env-file .env 
  -p 8000:8000 
  opencode.it4i.eu:5050/exa4mind/platform/aqis/query-inference/ai-inference-service:latest