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

70 Commits

Author SHA1 Message Date
Eric Curtin
e25bc4a357 More cuda vLLM enablement
Get this working fully

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-07-26 21:40:58 +01:00
Stephen Smoogen
8ab242f820 Move rpms (#1693)
* Start adding rpm/ramalama.spec for Fedora

Add a ramalama.spec to sit next to python-ramalama.spec while we get
this reviewed. Change various configs so they are aware of
ramalama.spec

Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>

* Add needed obsoletes/provides in base rpm to start process.

Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>

* Try to fix CI problems with initial mr

The initial MR puts two spec files in the same directory which was
causing problems with the CI. This splits them off into different
directories which should allow for the tooling to work.

Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>

* Finish move of Fedora rpm package to new name.

Put changes into various files needed to allow for new RPM package
`ramalama` to build in Fedora infrastructure versus python3-ramalama.

Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>

* Fix problem with path names lsm5 caught

Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>

---------

Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>
Co-authored-by: Stephen Smoogen <ssmoogen@redhat.com>
2025-07-14 10:13:49 -04:00
Eric Curtin
5b20aa4e2c mlx fixes
mlx_lm.server is the only one in my path at least on my system.

Also, printing output like this which doesn't make sense:

Downloading huggingface://RedHatAI/Llama-3.2-1B-Instruct-FP8-dynamic/model.safetensors:latest ...
Trying to pull huggingface://RedHatAI/Llama-3.2-1B-Instruct-FP8-dynamic/model.safetensors:latest ...

Also remove recommendation to install via `brew install ramalama`, skips installing Apple specific
dependancies.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-07-08 15:57:25 +01:00
Eric Curtin
42b6525187 This installs ramalama via uv if python3 version is too old
Lets say in the case of RHEL9.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-12 13:33:37 +01:00
Xiaodong Ye
80f2393283 Support Moore Threads GPU
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-05-15 19:20:31 +08:00
Eric Curtin
37a56dbdbf Make installer more resilliant
This checked in file is an exact copy of:

curl -LsSfO https://astral.sh/uv/0.7.2/install.sh

Checking in the 0.7.2 version, because now a user can install with
access to github.com alone. Even if astral.sh is down for whatever
reason.

We may want to update uv installer from time to time.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-05-01 20:08:28 +01:00
Eric Curtin
f790ae4361 Simplify installer
Use uv installer from uv itself

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-04-30 16:38:58 +01:00
Sergio Arroutbi
e6e8b1e881 Use RamaLama instead of Ramalama for consistency
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
2025-04-25 16:56:01 +02:00
Daniel J Walsh
d39d878d19 Setup /venv for running llama-stack
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-04-15 20:44:27 -04:00
Daniel J Walsh
dcc810c81a Merge pull request #1160 from containers/install-script-fix
Also hardcode version into version.py as fallback
2025-04-15 09:25:19 -04:00
Eric Curtin
5988cdcfc2 Also hardcode version into version.py as fallback
This way we should always return the current version

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-04-15 13:07:48 +01:00
Eric Curtin
ed4046fb82 macOS tip to install homebrew
It's a requirement for macOS installs.

Co-Authored-By: Rashid Khan <rkhan@redhat.com>
Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-04-15 12:10:29 +01:00
reidliu41
c5e9fb8511 update from suggestion
Signed-off-by: reidliu41 <reid201711@gmail.com>
2025-04-13 10:57:15 +08:00
reidliu41
21456ed680 [Misc] update install script
Signed-off-by: reidliu41 <reid201711@gmail.com>
2025-04-13 10:49:33 +08:00
Eric Curtin
c11a84ae5f Quick fix to installer
Directory was not right

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-04-06 15:22:06 +01:00
Eric Curtin
83215cfd33 Introduce wrapper for serve and run
We are coming to the limits of what we can do in a "podman run"
line. Create wrapper functions so we can do things like forking
processes and other similar things that you need to do inside a
container in python3. There are some features coming up where
rather than upstreaming separate solutions to all our engines
like vLLM and llama.cpp we want to solve the problem in the
python3 layer.

The "if True:"'s will remain for a while, we may need to wait for
containers to be distributed around the place before we turn things
on.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-04-03 18:13:41 +01:00
Eric Curtin
dbe7775513 Make install script more aesthetically pleasing
Print RamaLama and Llama based loading bar.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-03-21 23:05:43 +00:00
Eric Curtin
741ecf2718 Fix install.sh for OSTree system
Don't run dnf install on OSTree system.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-03-12 12:14:04 +00:00
Eric Curtin
8d3a44adac Consolidate gpu detection
This makes sure the gpu detection techniques are the same
throughout the project. We do not display detailed accelerator info,
leave that to tools like "fastfetch" it is hard to maintain, there
are no standards.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-03-11 18:27:33 +00:00
Michael Engel
f55475e36d Added converting go templates to jinja templates
Usually, the chat templates for gguf models are written as jinja templates.
Ollama, however, uses Go Templates specific to ollama. In order to use the
proper templates for models pulled from ollama, the chat templates are
converted to jinja ones and passed to llama-run.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-03-11 15:41:55 +01:00
Eric Curtin
87cfc4bd18 Bugfixes noticed while installing on Raspberry Pi
Just some nits

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-03-11 12:26:24 +00:00
Michael Engel
4dd6b66723 Added model store and ollama integration
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-03-05 11:26:08 +01:00
Eric Curtin
4b1b4f4bc4 Add new ramalama-*-core executables
ramalama-serve-core is intended to act as a proxy and implement
multiple-models. ramalama-client-core in intended to act as a OpenAI
client. ramalama-run-core is intended to act as ramalama-serve-core +
ramalama-client-core, both processes will die on completion of
ramalama-run-core.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-03-04 14:00:50 +00:00
Michael Engel
181d4959dd Provide module for configuration
In cli.py we already load and merge configuration from various sources
and set defaults in the load_and_merge_config(). However, we still define
defaults when getting config values in various places.
In order to streamline this, the merged config is being provided by a
dedicated config.py module. Also, access to values is changed from .get
to access by index since a missing key is a bug and should throw an error.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-02-26 17:42:30 +01:00
Eric Curtin
14a876d544 The package available via dnf is in a good place
Defaulting to that on platforms that have dnf, if it fails for
whatever reason, fall back to this script.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-02-25 13:33:58 +00:00
Michael Engel
ca499a9bba Moved creating model based on cli input to factory
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-02-24 10:11:12 +01:00
Eric Curtin
bfe91e3c2d Make CI build all images
To ensure they all continue to build and remain of reasonable size.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-02-22 13:48:50 +00:00
Eric Curtin
678ae4b79a Switch apt-get to apt
There was a request to switch to the newer apt.

Co-authored-by: Chris Paquin <cpaquin@redhat.com>
Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-02-16 17:25:07 +00:00
Daniel J Walsh
4e4e6708bf Add ramalama rag command
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-02-12 11:43:09 -05:00
Michael Engel
36bcc94ec3 Added CI step to check installed python files
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-02-10 17:37:44 +01:00
Michael Engel
496692cd18 Added inspect CLI command to display model info
AI Models are shipped with a lot of (meta) information such as
the used architecture, the chat template it requires and so on.
In order to make these available to the user, the new CLI command
inspect with the option support for --all and --json has been
implemented.
At the moment the GGUF file format - which includes the model as
well as the (meta) information in one file - is fully supported.
Other formats where the model and information is stored in different
files are not (yet) supported and only display basic information
such as the model name, path and registry.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-02-10 17:37:44 +01:00
Eric Curtin
d792b458e2 There's a comma in the list of files in install.sh
It shouldn't be there. Also remove the -qq, it makes it feel
like the script isn't making progress as podman takes a while to
install.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-02-04 22:24:58 +00:00
Douglas Schilling Landgraf
b0678aa656 common: general improvements
- if timeout happens we try 5 times before
  sending Timeout error to users.

- improve user experience when timeout occurs

- Added console source tree for handling messages

Resolves: https://github.com/containers/ramalama/issues/693
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
2025-02-02 19:16:15 -05:00
Graham Stevens
1c4112123b Update install.sh
Signed-off-by: Graham Stevens <331262+graystevens@users.noreply.github.com>
2025-02-01 21:48:40 +00:00
Eric Curtin
bf652941c2 This should be a global variable
Not a local one

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-02-01 16:44:02 +00:00
Eric Curtin
96dc553f8a Introduce a mode so one call install from git
If you have git clone'd the project, you now have the option of
doing:

./install.sh -l

And it will install the version from the git repo.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-01-31 16:17:37 +00:00
Daniel J Walsh
484457b2a5 Merge pull request #622 from containers/install-ostree
Avoid dnf install on OSTree system
2025-01-24 08:27:09 -05:00
Eric Curtin
451f90fc3c Make output less verbose
Now it looks like this:

$ ./install.sh
Downloaded ramalama
Downloaded cli.py
Downloaded huggingface.py
Downloaded model.py
Downloaded ollama.py
Downloaded common.py
Downloaded __init__.py
Downloaded quadlet.py
Downloaded kube.py
Downloaded oci.py
Downloaded version.py
Downloaded shortnames.py
Downloaded toml_parser.py
Downloaded file.py
Downloaded http_client.py
Downloaded url.py
Downloaded annotations.py

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-01-23 22:40:09 +00:00
Eric Curtin
7d8cc5a620 Avoid dnf install on OSTree system
It's not mutable

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-01-23 21:53:08 +00:00
Eric Curtin
bced453968 Attempt to install podman
Try and install podman via dnf or apt-get

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-01-23 13:58:19 +00:00
Eric Curtin
b9f4cbd8c1 We no longer have python dependancies
No python3 dependancies outside of the standard python libs.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-01-14 19:39:20 +00:00
Eric Curtin
79eef4ada9 Add missing files to install.sh script
file.py , http_client.py , etc.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2024-12-22 18:53:12 +00:00
Eric Curtin
abc5b38bc8 Simplify install
So we can just have one version of the installer from the user perspective

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2024-12-11 15:52:04 +00:00
Jeff Ligon
716da49ac4 Update install.sh
added a check for pipx in the install script

Signed-off-by: Jeff Ligon <jligon@redhat.com>
2024-11-26 11:27:50 -05:00
Daniel J Walsh
8ae6be0ff8 Add --generate quadlet/kube to create quadlet and kube.yaml
Quadlets can directly execute a kube.yaml file, this option
makes it easy for users to generate a quadlet to execute the
kube.yaml file.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-11-06 13:38:15 -05:00
Eric Curtin
fbb52bce42 Bugfix comma
There shouldn't be a comma here

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2024-11-06 17:38:27 +00:00
Daniel J Walsh
7f34d4fb50 Make quadlets work with OCI images
Need to be able to handle different kinds of quadlets.

Generates just a container for path based images, while
for OCI images creates a .container, .volume and .image file.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-11-04 08:23:34 -05:00
Eric Curtin
0e6db50e9a Drop in config
For setting configs in a config file

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2024-10-29 18:09:19 +00:00
Daniel J Walsh
3656d750ed Remove requirements.txt, pyproject.toml handles it
fix huggingface_hub since this package exists as well.

make install  use --no-deps

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-10-11 11:34:43 -04:00
Eric Curtin
3a27d68e32 Creating a hack/rm.sh script
Want to try and install via pipx and wrote a script to remove old
install. Also converted python install script back to shell, the
python experience in a new mac is just not nice in comparison to
bash.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2024-10-04 15:26:34 +01:00