tool-containers
Menu
GitHub (opens in new tab)

Run Omnigent with Docker Compose

The omnigent service runs Omnigent on the directory in WORKSPACE. compose.sh checks that WORKSPACE is an absolute path, because Compose would resolve a relative one against this directory, then runs docker compose here.

Images
  • GHCRghcr.io/hambn/omnigent
  • Docker Hubdocker.io/hambn/omnigent
Use case
Repeatable local orchestration sessions
Upstream
github.com/omnigent-ai/omnigent (opens in new tab)
Source
tools/ai/omnigent/docs/docker-compose (opens in new tab)
On this page

Prerequisites

  • Docker Engine with the Compose v2 plugin.
  • A model credential, such as ANTHROPIC_API_KEY or OPENAI_API_KEY.

Run Omnigent

The Compose files pass no environment. Forward your key with -e:

Shell
export ANTHROPIC_API_KEY=sk-ant-...
WORKSPACE="$PWD" ./compose.sh run --rm -e ANTHROPIC_API_KEY omnigent

Arguments after the service name go to omnigent, for example omnigent codex. Omnigent's settings in /home/sysadmin/.omnigent are removed with the container, and its web UI on port 6767 is not published.

Run without registry access

On a connected machine, run docker save ghcr.io/hambn/omnigent:ubuntu-browser -o omnigent.tar. On the offline host, load it and use the air-gapped file, which sets pull_policy: never:

Shell
docker load -i omnigent.tar
WORKSPACE="$PWD" ./compose.sh -f airgapped.docker-compose.yml run --rm \
  -e ANTHROPIC_API_KEY omnigent

Variables

Variable Required Purpose
WORKSPACE yes Absolute host path mounted at /workspace.
OMNIGENT_IMAGE no Image for both Compose files. Defaults to ghcr.io/hambn/omnigent:ubuntu-browser; set a digest reference to pin one build.

Workspace

WORKSPACE is mounted at /workspace. Omnigent runs as UID 1000, so new files belong to UID 1000 on the host.

Files

File contents

airgapped.docker-compose.yml12 lines
# Offline: docker load -i omnigent.tar first, then
# WORKSPACE="$PWD" ./compose.sh -f airgapped.docker-compose.yml run --rm omnigent
name: omnigent

services:
  omnigent:
    image: ${OMNIGENT_IMAGE:-ghcr.io/hambn/omnigent:ubuntu-browser}
    pull_policy: never
    volumes:
      - ${WORKSPACE:?Set WORKSPACE to an absolute host path}:/workspace
    stdin_open: true
    tty: true
compose.sh18 lines
#!/usr/bin/env bash
# Compose resolves relative paths against this directory, so require an absolute WORKSPACE.
set -euo pipefail

case "${WORKSPACE:-}" in
/*) ;;
"")
    echo "Set WORKSPACE to an absolute host path." >&2
    exit 2
    ;;
*)
    echo "WORKSPACE must be an absolute host path: $WORKSPACE" >&2
    exit 2
    ;;
esac

cd -- "$(dirname -- "${BASH_SOURCE[0]}")"
exec docker compose "$@"
docker-compose.yml10 lines
# WORKSPACE="$PWD" ./compose.sh run --rm omnigent
name: omnigent

services:
  omnigent:
    image: ${OMNIGENT_IMAGE:-ghcr.io/hambn/omnigent:ubuntu-browser}
    volumes:
      - ${WORKSPACE:?Set WORKSPACE to an absolute host path}:/workspace
    stdin_open: true
    tty: true

Topics