langextract Docker & Self-Hosted Deployment

GitHub

A Python library for extracting structured information from unstructured text using LLMs with precise source grounding and interactive visualization.

RAW Compose
1. Pull Image (DOCKERHUB) docker pull ollama/ollama
2. Docker Run (1-Click Launch) docker run -d --name langextract -p 11434:11434 --restart always ollama/ollama:0.5.4
3. Podman Run podman run -d --name langextract -p 11434:11434 --restart always ollama/ollama:0.5.4
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/ollama/ollama:0.5.4
5. ORAS Pull (OCI Artifact) oras pull ollama/ollama:0.5.4
6. Compose Deployment docker compose up -d
examples/ollama/docker-compose.yml
Download .yml
# Copyright 2025 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

services:
  ollama:
    image: ollama/ollama:0.5.4
    ports:
      - "127.0.0.1:11434:11434"  # Bind only to localhost for security
    volumes:
      - ollama-data:/root/.ollama  # Cross-platform support
    command: serve
    healthcheck:
      test: ["CMD", "ollama", "list"]
      interval: 5s
      timeout: 3s
      retries: 5
      start_period: 10s

  langextract:
    build: .
    depends_on:
      ollama:
        condition: service_healthy
    environment:
      - OLLAMA_HOST=http://ollama:11434
    volumes:
      - .:/app
    command: python demo_ollama.py

volumes:
  ollama-data: