Skip to content

Instantly share code, notes, and snippets.

@DaWe35
Last active February 22, 2025 14:45
Show Gist options
  • Save DaWe35/63e13494000d3425b9ac04c33cff6d78 to your computer and use it in GitHub Desktop.
Save DaWe35/63e13494000d3425b9ac04c33cff6d78 to your computer and use it in GitHub Desktop.

Steps to install and use a model in Ollama with Open WebUI in Docker:

  1. Run Ollama container:

    docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
  2. Run Open Web UI container:

    docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
  3. Install and list models:

    docker exec -it ollama /bin/bash
    ollama pull <model_name>
    ollama list
    exit
  4. Access the Web UI: http://localhost:3000

  5. Ollama commands:

Usage:
  ollama [flags]
  ollama [command]

Available Commands:
  serve       Start ollama
  create      Create a model from a Modelfile
  show        Show information for a model
  run         Run a model
  stop        Stop a running model
  pull        Pull a model from a registry
  push        Push a model to a registry
  list        List models
  ps          List running models
  cp          Copy a model
  rm          Remove a model
  help        Help about any command

Flags:
  -h, --help      help for ollama
  -v, --version   Show version information
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment