Getting Started

How to pull and run OmniAI locally

Prerequisites

  • Ensure you have Docker installed and running on your machine. Follow the Docker documentation.

  • Ensure you have AWS CLI installed and configured with access to AWS ECR. Follow the AWS documentation.

Authenticate to ECR

Authenticate your Docker client to the AWS ECR registry where the image is hosted. This is a private repository accessible to OmniAI enterprise clients. Please contact a team member to be granted access to the container registry.

Set your access key / secret:

Add the OmniAI access key & secret to your environment and authenticate Docker with ECR.

export AWS_ACCESS_KEY_ID=user_access_key_id 
export AWS_SECRET_ACCESS_KEY=user_secret_access_key
aws ecr get-login-password --region us-east-2 | docker login --username AWS --password-stdin 851725384009.dkr.ecr.us-east-2.amazonaws.com

Alternatively you can run as a single command

AWS_ACCESS_KEY_ID=user_access_key_id \
AWS_SECRET_ACCESS_KEY=user_secret_access_key \
aws ecr get-login-password --region us-east-2 | \
docker login --username AWS --password-stdin 851725384009.dkr.ecr.us-east-2.amazonaws.com

Pull the docker image

Pull the image from ECR.

docker pull 851725384009.dkr.ecr.us-east-2.amazonaws.com/omniai:latest

Tagging the image (optional)

Replace the ECR url with the more accessible omniai:latest tag.

docker tag 851725384009.dkr.ecr.us-east-2.amazonaws.com/omniai:latest omniai:latest

Running OmniAI

Running omniai:latest will launch the front-end (3000) and API service (4000).

On startup OmniAI will create a local Postgres database. Deleting the container will remove any data stored in this instance. See Docker Compose instructions for setting up a persistent volume.

docker run -d \
  --name omniai \
  -p 3000:3000 \
  -p 4000:4000 \
  -e OMNI_PRODUCT_KEY='12345' \
  omniai:latest

Running with Docker Compose

To run OmniAI with docker compose and persistent storage volume.

version: '1.01'
services:
  app:
    image: omniai:latest
    container_name: omniai
    ports:
      - "3000:3000"
      - "4000:4000"
    volumes:
      - pgdata:/var/lib/postgresql/16/main
    environment:
      - OMNI_PRODUCT_KEY="12345"
volumes:
  pgdata:
    name: omni_pg_data

Running with Docker Secrets

The following is a Docker Compose example using environment variables via Docker secrets.

services:
  app:
    image: omni-dev
    # pull_policy: always
    ports:
      - "3000:3000"
      - "4000:4000"
      # - "5432:5432"
    environment:
      - OMNI_PRODUCT_KEY=12345
    secrets:
      - DATABASE_URL
    volumes:
      - pgdata:/var/lib/postgresql/16/main
secrets:
  DATABASE_URL:
    file: /path/to/DB_URL_SECRET
volumes:
  pgdata:
    name: omni_pg_data

The /path/to/DB_URL_SECRET file should contain only the expected env value. Ex:

postgresql://postgres:password@172.0.0.1:5432/omni

Last updated