anomalib Docker & Self-Hosted Deployment

GitHub

An anomaly detection library comprising state-of-the-art algorithms and features such as experiment management, hyper-parameter optimization, and edge...

RAW Compose
1. Pull Image (DOCKERHUB) docker pull library/anomalib-studio-${AI_DEVICE
2. Docker Run (1-Click Launch) docker run -d --name anomalib -p 8000:8000 --restart always anomalib-studio-${AI_DEVICE:-cpu}:${TAG:-latest}
3. Podman Run podman run -d --name anomalib -p 8000:8000 --restart always anomalib-studio-${AI_DEVICE:-cpu}:${TAG:-latest}
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/library/anomalib-studio-${AI_DEVICE:-cpu}
5. ORAS Pull (OCI Artifact) oras pull anomalib-studio-${AI_DEVICE:-cpu}:${TAG:-latest}
6. Compose Deployment docker compose up -d
application/docker/docker-compose.cuda.yaml
Download .yml
x-proxy-env: &proxy-env
  HTTP_PROXY: ${HTTP_PROXY}
  HTTPS_PROXY: ${HTTPS_PROXY}
  NO_PROXY: ${NO_PROXY}
  http_proxy: ${http_proxy}
  https_proxy: ${https_proxy}
  no_proxy: ${no_proxy}

x-proxies: &proxies
  args: *proxy-env

services:
  anomalib-studio:
    image: anomalib-studio-${AI_DEVICE:-cpu}:${TAG:-latest}
    environment:
      DEBUG: ${DEBUG:-false}
      HOST: ${HOST:-0.0.0.0}
      <<: *proxy-env
    restart: unless-stopped
    build:
      # Use root directory as context to build the image
      context: ../../
      dockerfile: application/docker/Dockerfile
      target: anomalib-studio-cuda
      <<: *proxies
    working_dir: /app/application/backend
    container_name: anomalib-studio-${AI_DEVICE:-cpu}
    volumes:
      # Persist database and uploaded data
      - ../backend/data:/app/data
      # Persist logs
      - ../backend/logs:/app/logs
    ports:
      # nosemgrep: trailofbits.yaml.docker-compose.port-all-interfaces.port-all-interfaces # to be replaced
      - "${HOST_PORT:-8000}:8000"
    # Increase file descriptor limits. Needed for uv bytecode compilation
    ulimits:
      nofile:
        soft: 65536
        hard: 65536
    # Uncomment the following lines to enable GPU support (NVIDIA GPUs only)
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
    # Map all host devices to provide access to webcams and other attached devices
    privileged: true
    devices:
      - /dev:/dev