1
0
mirror of https://github.com/containers/ramalama.git synced 2026-02-05 06:46:39 +01:00

Bump to 0.7.3

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2025-04-07 14:05:05 -04:00
parent 14bef6c830
commit 928541dff9
7 changed files with 29 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
[project]
name = "ramalama"
version = "0.7.2"
version = "0.7.3"
dependencies = [
"argcomplete",
]

View File

@@ -9,7 +9,7 @@ from pathlib import Path
import ramalama.oci
import ramalama.rag
from ramalama.common import get_accel, perror, run_cmd
from ramalama.common import accel_image, get_accel, perror, run_cmd
from ramalama.config import CONFIG
from ramalama.model import MODEL_TYPES
from ramalama.model_factory import ModelFactory
@@ -118,7 +118,7 @@ Needed to access gpu on some systems, but has security implications.""",
)
parser.add_argument(
"--image",
default=CONFIG["image"],
default=accel_image(CONFIG, None),
help="OCI container image to run with the specified AI model",
action=OverrideDefaultAction,
)

View File

@@ -490,16 +490,26 @@ def minor_release():
return vers
def tagged_image(image):
if len(image.split(":")) > 1:
return image
return f"{image}:{minor_release()}"
def accel_image(config, args):
if len(args.image.split(":")) > 1:
if args and len(args.image.split(":")) > 1:
return args.image
if hasattr(args, 'image_override'):
return f"{args.image}:{minor_release()}"
return tagged_image(args.image)
if args.runtime == "vllm":
return "registry.redhat.io/rhelai1/ramalama-vllm"
image = os.getenv("RAMALAMA_IMAGE")
if image:
return tagged_image(image)
conman = config['engine']
images = config['images']
set_accel_env_vars()
env_vars = get_accel_env_vars()
if not env_vars:
@@ -507,8 +517,12 @@ def accel_image(config, args):
else:
gpu_type, _ = next(iter(env_vars.items()))
conman = config['engine']
images = config['images']
if not args:
return tagged_image(images.get(gpu_type, config["image"]))
if args.runtime == "vllm":
return "registry.redhat.io/rhelai1/ramalama-vllm"
image = images.get(gpu_type, args.image)
if hasattr(args, "rag") and args.rag:
image += "-rag"

View File

@@ -71,8 +71,10 @@ COPY {src} /vector.db
raise e
def generate(self, args):
# force accel_image to use -rag version
# force accel_image to use -rag version. Drop TAG if it exists
# so that accel_image will add -rag to the image specification.
args.rag = "rag"
args.image = args.image.split(":")[0]
args.image = accel_image(CONFIG, args)
if not args.container:

View File

@@ -1,7 +1,7 @@
%global pypi_name ramalama
%global forgeurl https://github.com/containers/%{pypi_name}
# see ramalama/version.py
%global version0 0.7.2
%global version0 0.7.3
%forgemeta
%global summary RamaLama is a command line tool for working with AI LLM models

View File

@@ -64,7 +64,7 @@ class build_py(build_py_orig):
setuptools.setup(
name="ramalama",
version="0.7.2",
version="0.7.3",
packages=find_packages(),
cmdclass={"build_py": build_py},
scripts=["bin/ramalama"],

View File

@@ -19,7 +19,7 @@ load helpers
# FIXME Engine (podman|docker|'')
tests="
Image | "quay.io/ramalama/ramalama"
Image | "quay.io/ramalama/ramalama.*"
Runtime | "llama.cpp"
Version | "${version}"
Store | \\\("${HOME}/.local/share/ramalama"\\\|"/var/lib/ramalama"\\\)