-
Notifications
You must be signed in to change notification settings - Fork 353
Add automated base image detection with hardware compatibility matrix #2395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,203 @@ | ||
| # Image Compatibility Matrix for RamaLama | ||
| # | ||
| # This file defines the mapping between hardware configurations and container images. | ||
| # Images are selected based on: | ||
| # - Architecture (x86_64, aarch64) | ||
| # - GPU type (cuda, hip, intel, asahi, cann, musa, vulkan, metal, none) | ||
| # - Driver version (with version constraints like >=12.4, <13.0) | ||
| # - Runtime (llama.cpp, vllm, mlx) | ||
| # - OS type (linux, darwin, windows) | ||
| # | ||
| # Version constraint syntax: | ||
| # >=12.4 - Greater than or equal to 12.4 | ||
| # <13.0 - Less than 13.0 | ||
| # ==12.4 - Exactly 12.4 | ||
| # >=12.4,<13.0 - Range (AND logic) | ||
| # * - Any version (default) | ||
|
|
||
| schema_version: "1.0.0" | ||
| default_image: "quay.io/ramalama/ramalama" | ||
|
|
||
| images: | ||
| # ============================================================================= | ||
| # CUDA (NVIDIA) Images | ||
| # ============================================================================= | ||
|
|
||
| # CUDA for llama.cpp - supports CUDA 12.4+ | ||
| - image: "quay.io/ramalama/cuda" | ||
| priority: 100 | ||
| constraints: | ||
| architectures: ["x86_64"] | ||
| gpu_types: ["cuda"] | ||
| driver_version: ">=12.4" | ||
| runtimes: ["llama.cpp"] | ||
| os_types: ["linux"] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing windows in os_types |
||
| tags: | ||
| # CUDA 12.4-12.7 use the -12.4.1 suffix image | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. where did this list of tags come from? They don't exist. |
||
| "12.4": "latest-12.4.1" | ||
| "12.5": "latest-12.4.1" | ||
| "12.6": "latest-12.4.1" | ||
| "12.7": "latest-12.4.1" | ||
| # CUDA 12.8+ use the standard image (no suffix needed) | ||
|
|
||
| # ============================================================================= | ||
| # ROCm (AMD) Images | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ROCm is a bit difficult to handle. We really should default to vulkan instead for GPUs/APU that are not officially supported. |
||
| # ============================================================================= | ||
|
|
||
| # ROCm for llama.cpp - x86_64 only (ROCm not available for ARM) | ||
| - image: "quay.io/ramalama/rocm" | ||
| priority: 100 | ||
| constraints: | ||
| architectures: ["x86_64"] | ||
| gpu_types: ["hip"] | ||
| driver_version: "*" | ||
| runtimes: ["llama.cpp"] | ||
| os_types: ["linux"] | ||
|
|
||
| # ============================================================================= | ||
| # Intel GPU Images | ||
| # ============================================================================= | ||
|
|
||
| # Intel GPU for llama.cpp - supports Arc and integrated GPUs | ||
| - image: "quay.io/ramalama/intel-gpu" | ||
| priority: 100 | ||
| constraints: | ||
| architectures: ["x86_64"] | ||
| gpu_types: ["intel"] | ||
| driver_version: "*" | ||
| runtimes: ["llama.cpp"] | ||
| os_types: ["linux"] | ||
|
|
||
| # ============================================================================= | ||
| # Apple Silicon Images | ||
| # ============================================================================= | ||
|
|
||
| # Asahi Linux (Apple Silicon on Linux) | ||
| - image: "quay.io/ramalama/asahi" | ||
| priority: 100 | ||
| constraints: | ||
| architectures: ["aarch64"] | ||
| gpu_types: ["asahi"] | ||
| driver_version: "*" | ||
| runtimes: ["llama.cpp"] | ||
| os_types: ["linux"] | ||
|
|
||
| # ============================================================================= | ||
| # Ascend (Huawei) NPU Images | ||
| # ============================================================================= | ||
|
|
||
| # CANN for Ascend NPU | ||
| - image: "quay.io/ramalama/cann" | ||
| priority: 100 | ||
| constraints: | ||
| architectures: ["x86_64", "aarch64"] | ||
| gpu_types: ["cann"] | ||
| driver_version: "*" | ||
| runtimes: ["llama.cpp"] | ||
| os_types: ["linux"] | ||
|
|
||
| # ============================================================================= | ||
| # Mthreads (MUSA) Images | ||
| # ============================================================================= | ||
|
|
||
| # MUSA for Mthreads GPUs | ||
| - image: "quay.io/ramalama/musa" | ||
| priority: 100 | ||
| constraints: | ||
| architectures: ["x86_64"] | ||
| gpu_types: ["musa"] | ||
| driver_version: "*" | ||
| runtimes: ["llama.cpp"] | ||
| os_types: ["linux"] | ||
|
|
||
| # ============================================================================= | ||
| # vLLM Runtime Images | ||
| # ============================================================================= | ||
|
|
||
| # vLLM for CUDA GPUs | ||
| - image: "docker.io/vllm/vllm-openai" | ||
| priority: 50 | ||
| constraints: | ||
| architectures: ["x86_64"] | ||
| gpu_types: ["cuda"] | ||
| driver_version: ">=12.0" | ||
| runtimes: ["vllm"] | ||
| os_types: ["linux"] | ||
|
|
||
| # vLLM for ROCm GPUs | ||
| - image: "docker.io/vllm/vllm-openai" | ||
| priority: 50 | ||
| constraints: | ||
| architectures: ["x86_64"] | ||
| gpu_types: ["hip"] | ||
| driver_version: "*" | ||
| runtimes: ["vllm"] | ||
| os_types: ["linux"] | ||
|
|
||
| # vLLM fallback for other GPUs | ||
| - image: "docker.io/vllm/vllm-openai" | ||
| priority: 10 | ||
| constraints: | ||
| architectures: ["x86_64", "aarch64"] | ||
| gpu_types: ["intel", "asahi", "cann", "musa", "none"] | ||
| driver_version: "*" | ||
| runtimes: ["vllm"] | ||
| os_types: ["linux"] | ||
|
|
||
| # ============================================================================= | ||
| # RAG Images | ||
| # ============================================================================= | ||
|
|
||
| # RAG with CUDA | ||
| - image: "quay.io/ramalama/cuda-rag" | ||
| priority: 100 | ||
| constraints: | ||
| architectures: ["x86_64"] | ||
| gpu_types: ["cuda"] | ||
| driver_version: ">=12.4" | ||
| runtimes: ["llama.cpp-rag"] | ||
| os_types: ["linux"] | ||
|
|
||
| # RAG with ROCm | ||
| - image: "quay.io/ramalama/rocm-rag" | ||
| priority: 100 | ||
| constraints: | ||
| architectures: ["x86_64"] | ||
| gpu_types: ["hip"] | ||
| driver_version: "*" | ||
| runtimes: ["llama.cpp-rag"] | ||
| os_types: ["linux"] | ||
|
|
||
| # RAG with Intel GPU | ||
| - image: "quay.io/ramalama/intel-gpu-rag" | ||
| priority: 100 | ||
| constraints: | ||
| architectures: ["x86_64"] | ||
| gpu_types: ["intel"] | ||
| driver_version: "*" | ||
| runtimes: ["llama.cpp-rag"] | ||
| os_types: ["linux"] | ||
|
|
||
| # RAG fallback | ||
| - image: "quay.io/ramalama/ramalama-rag" | ||
| priority: 1 | ||
| constraints: | ||
| architectures: ["x86_64", "aarch64"] | ||
| gpu_types: ["none", "vulkan", "asahi", "cann", "musa"] | ||
| driver_version: "*" | ||
| runtimes: ["llama.cpp-rag"] | ||
| os_types: ["linux"] | ||
|
|
||
| # ============================================================================= | ||
| # Default CPU/Vulkan Fallback Images | ||
| # ============================================================================= | ||
|
|
||
| # Default fallback for llama.cpp (CPU or Vulkan acceleration) | ||
| - image: "quay.io/ramalama/ramalama" | ||
| priority: 1 | ||
| constraints: | ||
| architectures: ["x86_64", "aarch64"] | ||
| gpu_types: ["none", "vulkan"] | ||
| driver_version: "*" | ||
| runtimes: ["llama.cpp"] | ||
| os_types: ["linux", "darwin", "windows"] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-07/schema#", | ||
| "title": "RamaLama schema for image compatibility matrix", | ||
| "type": "object", | ||
| "properties": { | ||
| "schema_version": { | ||
| "type": "string", | ||
| "pattern": "^\\d+\\.\\d+(\\.\\d+)?$", | ||
| "description": "Schema version in semver format" | ||
| }, | ||
| "default_image": { | ||
| "type": "string", | ||
| "description": "Default image to use when no match is found" | ||
| }, | ||
| "images": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "object", | ||
| "required": ["image", "constraints"], | ||
| "properties": { | ||
| "image": { | ||
| "type": "string", | ||
| "description": "Container image URL (e.g., quay.io/ramalama/cuda)" | ||
| }, | ||
| "priority": { | ||
| "type": "integer", | ||
| "default": 0, | ||
| "description": "Priority for image selection. Higher priority images are preferred when multiple match." | ||
| }, | ||
| "constraints": { | ||
| "type": "object", | ||
| "properties": { | ||
| "architectures": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string", | ||
| "enum": ["x86_64", "aarch64"] | ||
| }, | ||
| "description": "Supported CPU architectures" | ||
| }, | ||
| "gpu_types": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string", | ||
| "enum": ["cuda", "hip", "intel", "asahi", "cann", "musa", "vulkan", "metal", "none"] | ||
| }, | ||
| "description": "Supported GPU types" | ||
| }, | ||
| "driver_version": { | ||
| "type": "string", | ||
| "description": "Driver version constraint (e.g., '>=12.4', '<13.0', '>=12.4,<13.0', '*')" | ||
| }, | ||
| "runtimes": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| }, | ||
| "description": "Supported inference runtimes (e.g., 'llama.cpp', 'vllm', 'mlx')" | ||
| }, | ||
| "os_types": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string", | ||
| "enum": ["linux", "darwin", "windows"] | ||
| }, | ||
| "description": "Supported operating systems" | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| }, | ||
| "tags": { | ||
| "type": "object", | ||
| "additionalProperties": { | ||
| "type": "string" | ||
| }, | ||
| "description": "Version-specific image tags. Keys are driver versions (e.g., '12.4'), values are tags." | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| } | ||
| } | ||
| }, | ||
| "required": ["schema_version", "default_image", "images"], | ||
| "additionalProperties": false | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a compelling reason to use a yaml config file vs code for this?