ollama - chunhualiao/public-docs GitHub Wiki

ollama:streaming mode

tokens per second

model files

To display the full file paths of models managed by Ollama, you can follow these steps:

  1. Locate the Models Directory: Ollama stores its models in a default directory, which varies depending on your operating system:

    • Linux: /usr/share/ollama/.ollama/models
    • macOS: ~/.ollama/models
    • Windows: C:\Users\%username%\.ollama\models

    If you've set the OLLAMA_MODELS environment variable to customize the storage location, models will be stored in the directory specified by this variable.

  2. List Model Files: Once you've identified the models directory, you can list the files within it to view the full paths of the stored models. For example, on a Linux or macOS system, you can use the find command:

    find /usr/share/ollama/.ollama/models -type f

    This command will recursively list all files in the models directory, displaying their full paths.

  3. Cross-Reference with ollama list: The ollama list command provides a list of installed models by name. You can cross-reference this list with the files in the models directory to match model names with their corresponding file paths. Keep in mind that the filenames may include unique identifiers or hashes, so they might not exactly match the model names displayed by ollama list.

By following these steps, you can identify the full file paths of the models managed by Ollama on your system.

Installation

download manually, then install, restart, pull new models requiring newer version of ollama

 wget https://ollama.com/download/ollama-linux-amd64.tgz

 sudo tar -xzf ollama-linux-amd64.tgz -C /usr/bin

Or 
  sudo tar -xzf ollama-linux-amd64.tgz -C /usr/local/bin

 ls -l /usr/bin/ollama

-rwxr-xr-x 1 root root 31811296 Apr  2 19:00 /usr/bin/ollama

there are other lib files must be installed
* still best option is to revise official install.sh file to go through the process!!
* I have a modified version under ~/Download/ollama-install.sh

pkill ollama

nohup ollama serve &

ollama run gemma3:27b-it-q8_0

Open WebUI

https://github.com/open-webui/open-webui

  • support pdf uploads
  • open-webui serve

ollama-gui works, but does not support file uploads

  • also the installation process is compilicated.

Ollama's dependencies vary across its ecosystem components and installation methods. Based on the available technical documentation:

Core Dependencies:

  • Python 3.8+ (required for Python client integrations) [4]
  • HTTPX (v0.27-0.29) for HTTP client operations [4]
  • Pydantic (v2.9.0) for data validation [4]
  • CUDA/ROCm drivers for GPU acceleration (Nvidia GPUs require compute capability ≥5.0) [6]

Development Tooling:

  • Poetry for Python dependency management [2]
  • Testcontainers (v1.19.1) for Java integration testing [3]
  • Pytest (+ plugins) for Python testing infrastructure [4]
  • Ruff (v0.9.x) for Python linting [4]

System Requirements:

  • cURL and unzip for Linux installations [2]
  • Chocolatey for Windows package management [2]
  • Homebrew for macOS installations [2]
  • Docker for containerized deployments [6]

GPU-Specific Requirements:

Component Requirement
NVIDIA GPUs Compute Capability ≥5.0
AMD GPUs ROCm-supported hardware
Docker Setup NVIDIA Container Toolkit

Language-Specific Clients:

  1. Python Client:

    pip install ollama  # Installs core + OpenAI integration
  2. JavaScript Client:

    npm install ollama  // Requires Node.js environment
  3. Java Integration:

    <dependency>
      <groupId>dev.langchain4j</groupId>
      <artifactId>langchain4j-ollama</artifactId>
      <version>1.0.0-alpha1</version>
    </dependency>

For GPU-accelerated workloads, Ollama requires proper configuration of environment variables like OLLAMA_ORIGINS for CORS and OLLAMA_MODELS for custom model storage paths [6]. The system leverages platform-specific package managers (Homebrew, Chocolatey, apt) for simplified installation across operating systems [2].

server config

server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_CONTEXT_LENGTH:4096 OLLAMA_DEBUG:false OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://127.0.0.1:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/home/user1/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NEW_ENGINE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 OLLAMA_ORIGINS:[http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://* vscode-webview://* vscode-file://*] OLLAMA_SCHED_SPREAD:false ROCR_VISIBLE_DEVICES: http_proxy: https_proxy: no_proxy:]"

source=images.go:463 msg="total blobs: 24"

source=images.go:470 msg="total unused blobs removed: 0"

source=routes.go:1300 msg="Listening on 127.0.0.1:11434 (version 0.6.8)"

⚠️ **GitHub.com Fallback** ⚠️