10 Sentinels Active
SENTINEL 01: [AEGIS] AUDITING POCKETBASE INFRASTRUCTURE...
Back to Self-Hosted Stacks
Google Gemma 2

Deploy Google Gemma 2

Google's open-weight models (9B, 27B) with class-leading performance and efficient architecture.

Quick Start

1

Create a directory

mkdir gemma-self-hosted && cd gemma-self-hosted
2

Create config file

Copy the content from the Config tab below into a file named docker-compose.yml

3

Deploy

docker compose up -d
Fast Track

Deploy Google Gemma 2 in Minutes

Use our optimized Docker templates to deploy Google Gemma 2 on any cloud provider. Get $200 in free credit to start on DigitalOcean.

Start with free creditDeploy on DigitalOcean
$200

Metadata

License
Gemma License
Language
Python
Last Updated
Category
AI Models

Configuration

yaml
services:
  ollama:
    image: ollama/ollama:latest
    container_name: ollama-gemma
    restart: unless-stopped
    ports:
      - "11434:11434"
    volumes:
      - ollama_data:/root/.ollama
    # Uncomment for GPU support:
    # deploy:
    #   resources:
    #     reservations:
    #       devices:
    #         - driver: nvidia
    #           count: all
    #           capabilities: [gpu]
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:11434"]
      interval: 30s
      timeout: 10s
      retries: 3
    entrypoint: ["/bin/sh", "-c", "ollama serve & sleep 5 && ollama pull gemma2 && wait"]

volumes:
  ollama_data:

Community Notes

Help others by adding context, corrections, or warnings about this tool. Sign in to contribute.

No community notes yet. Be the first to add context.