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

117 Commits

Author SHA1 Message Date
John Wiele
6ffa25ff89 Remove generated doc files.
Clean the docsite directory as part of "make clean". Remove generated
doc files from the repository; their presence creates a risk of
publishing incorrect documentation.

Signed-off-by: John Wiele <jwiele@redhat.com>
2026-01-30 08:34:24 -05:00
Ian Eaves
db8bb5d9df adds support for hosted chat providers
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2026-01-24 16:00:59 -06:00
Mike Bonnet
dd540aa0a5 e2e: build a container for running the e2e tests
Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2026-01-16 14:07:50 -08:00
Oliver Walsh
fe2f3ca37f Fix bats-on-pull-request
Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2025-12-17 11:02:58 +00:00
Daniel J Walsh
50222f9458 Add support for converting to OCI artifacts
Add Podman >= 5.7.0 version requirement for artifact tests

Artifact support requires Podman 5.7.0 or later. This commit adds version
checking to skip artifact tests on systems with older Podman versions.

Changes:
- Add get_podman_version() and skip_if_podman_too_old() functions to test/system/helpers.bash
- Add skip_if_podman_too_old decorator to test/conftest.py for e2e tests
- Apply version check to all artifact-related tests in:
  - test/system/056-artifact.bats (BATS tests)
  - test/e2e/test_artifact.py (pytest e2e tests)
- Tests will be skipped with clear message on systems with Podman < 5.7.0
- Docker and nocontainer tests are also skipped as they don't support artifacts

The version check extracts the Podman version and compares it numerically,
handling development versions like "5.7.0-dev" correctly.

Cursor-AI-Generated

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-12-15 08:16:39 -05:00
John Wiele
108ce804af Add some convenience tweaks for developing with emacs.
Make flake8 use pylint format if run in an emacs compile buffer.  This
causes error messages to be formatted such that "C-x `" (next-error)
will go to the flagged line of code.

Add emacs backup files to .gitignore.

Signed-off-by: John Wiele <jwiele@redhat.com>
2025-12-03 10:39:16 -05:00
Mike Bonnet
5fd9c4f750 ci: run type checking
Add a "make type-check" Makefile target, and run it as part of the CI workflow.

Add a couple extra depedencies to enable type checking for yaml and jsonschema.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-10-28 18:08:39 -07:00
Mike Bonnet
eaff6f39a6 rag: build dedicated images for supported backends, and remove obsolete images
Build -rag images for backends with torch support (cuda, rocm, intel, and cpu).
The proper image will be selected at runtime, the same way the inference engine
image is selected.

Simplify the -rag image build (all images are now rpm/dnf-based) and install
python dependencies using uv.

Cache models used at runtime to /var/cache, and remove unnecessary cleanup.

Remove unused -rag image builds.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-10-23 22:02:26 -07:00
Daniel J Walsh
f2a97075dd Merge pull request #1988 from ramalama-labs/imp/docsite
updates docsite and adds docsite to the make docs process
2025-10-02 05:22:25 -04:00
John Wiele
01e2c0bcc9 Fix --exclude-dir arguments to grep in Makefile and add .tox.
Use the GNU Make addprefix function instead of relying on shell brace
expansion to generate --exclude-dir arguments for grep.

GNU Make uses /bin/sh to run recipes by default. /bin/sh may not
support brace expansion at all. On Fedora and RHEL, /bin/sh is an
alias for bash. On Ubuntu, /bin/sh is an alias for dash. On MacOS,
/bin/sh is an alias for zsh. Those all handle braces differently. In
particular, dash on Ubuntu does not do brace expansion within a word
with the result that PYTHON_SCRIPTS is generated incorrectly.

Signed-off-by: John Wiele <jwiele@redhat.com>
2025-10-01 14:44:16 -04:00
Ian Eaves
b32ce823f4 updates docsite and adds docsite to the make docs process
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-10-01 12:12:48 -05:00
Roberto Majadas
8e3340e2fe Add e2e pytest workflows to Github CI
This commit updates the Github's CI pipeline to include distinct workflows for running e2e pytests across different environments: no-container, docker, and macOS.

Signed-off-by: Roberto Majadas <rmajadas@redhat.com>
2025-09-19 11:47:23 +02:00
Roberto Majadas
e45562616a Introduce tox for testing and add e2e framework
This commit refactors the testing infrastructure to use tox,
centralizing the configuration in pyproject.toml.

Key changes:
- Makefile test targets now delegate to tox.
- A new pytest-based e2e testing framework is added.
- An initial e2e test for the version command is included.

Signed-off-by: Roberto Majadas <rmajadas@redhat.com>
2025-09-17 14:24:23 +02:00
Mike Bonnet
c58e59840e konflux: build ramalama images for s390x and ppc64le
Publish ramalama images for additional platforms.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-09-10 23:06:43 -07:00
John Wiele
1e98391dfa Fix the application of codespell in "make validate".
codespell should not update files in place, it should only
spellcheck. Updating in place messes up the git tree and potentially
causes problems.

"mountns" is in both the ignore-words-list specified in the toml file
and in the .codespelldict. The latter has priority, which means that
codespell tries to correct the ignore-words-list in the toml
file. Assuming that the word belongs in the .codespelldict, it makes
no sense to list it in the ignore-words-list so remove it.  Also fix
the formatting of the list.

Signed-off-by: John Wiele <jwiele@redhat.com>
2025-09-05 17:41:42 -04:00
Oliver Walsh
c8485b91ea Fix python environment in ci jobs
Was installing uv 2 different ways (github action and make install-requirement).
Use `uv run` explicitly instead of activating the virtualenv in the uv
github action (it's docs advise not to use this option).

Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2025-08-20 21:50:16 +01:00
Michael Engel
393f35e6d1 Splitting pypi build and upload into dedicated make targets
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-08-04 16:10:20 +02:00
Daniel J Walsh
368bdb37b5 Merge pull request #1769 from jtligon/stable-diff
building stable diffusion.
2025-08-01 19:26:40 -04:00
Jeff Ligon
678092638f building stable diffusion.
assisted by cursor/claude.

Signed-off-by: Jeff Ligon <jligon@redhat.com>

going with gemini's python_check(with the double equal) for this one.

Signed-off-by: Jeff Ligon <jligon@redhat.com>

changing to `MYPIP ?= pipx`

Signed-off-by: Jeff Ligon <jligon@redhat.com>

fixing uv pipx

Signed-off-by: Jeff Ligon <jligon@redhat.com>

taking it back to pip to fix ci

Signed-off-by: Jeff Ligon <jligon@redhat.com>
2025-08-01 12:06:47 -04:00
Ian Eaves
9ec66d5604 various typing and bug fixes
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-07-31 10:27:25 -05:00
Mike Bonnet
927d2f992a bats: allow the container to use the overlay driver when possible
Remove the STORAGE_DRIVER env var from the container so it doesn't force use
of the vfs driver in all cases.

Mount /dev/fuse into the container when running locally.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-07-15 09:03:49 -07:00
Roberto Majadas
e5e6195c49 Update lint and format tools configuration
Signed-off-by: Roberto Majadas <rmajadas@redhat.com>
2025-07-03 12:32:26 +02:00
Carl George
10cdbfb28d Use standard zsh completion directory
We're currently using /usr/share/zsh/vendor-completions for zsh
completions.  However, the RPM macro %{zsh_completions_dir} (which is
required by the Fedora packaging guidelines) is defined as
/usr/share/zsh/site-functions, so let's switch to that.

https://docs.fedoraproject.org/en-US/packaging-guidelines/ShellCompletions/

Signed-off-by: Carl George <carlwgeorge@gmail.com>
2025-06-27 02:07:37 -05:00
Mike Bonnet
4f479484de support running all Makefile targets in the bats container
Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-06-25 21:45:37 -07:00
Mike Bonnet
a651be7832 add support for running bats in a container
Add a new "bats" container which is configured to run the bats tests.
The container supports running the standard bats test suite
(container-in-container) as well as the "--nocontainer" tests.

Add two new Makefile targets for running the bats container via podman.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-06-25 21:45:12 -07:00
Sergio Arroutbi
ce24886c1d Reuse code for unit test execution rules
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
2025-06-18 18:06:10 +02:00
Sergio Arroutbi
5218906464 Add verbose rule for complete output on unit tests
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
2025-06-18 17:43:20 +02:00
Eric Curtin
3d71a9f7c9 Upgrade podman
Use ubuntu plucky repo for podman

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-16 18:28:08 +01:00
Daniel J Walsh
94f3a4e83a honor the user specifying the image
Currently we are ignoreing the user specified image if it does not
contain a ':'

Fixes: https://github.com/containers/ramalama/issues/1525

While I was in the code base, I standardized on container-images for
Fedora to come from quay.io/fedora repo.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-16 09:37:00 -04:00
Hannes
752516fce7 Add Python shebang files to Makefile linting
Signed-off-by: Hannes <h@nnes.dev>
2025-06-12 20:03:08 +08:00
Eric Curtin
b21556b513 Install uv to fix build issue
Run the install-uv.sh script.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-10 13:14:56 +01:00
Ian Eaves
f65529bda7 adds dev dependency groups
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-06-06 18:12:33 -05:00
Daniel J Walsh
a9f5238082 Merge pull request #1340 from ieaves/feat/standardized-build
Remove hardcoded /usr/local site-packages injection to fix sys.path pollution
2025-05-09 10:55:44 -04:00
Sergio Arroutbi
1de0c27534 Groom coverage rules, genreate xml/lcov reports
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
2025-05-08 11:36:42 +02:00
Ian Eaves
785c66184b updated build to remove setup.py dependency to fix cli entrypoint
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>

removed uv.lock

Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>

reverts uv-install.sh, bin/ramalama, and flat cli hierarchy

Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>

packit version extraction from pyproject.toml

Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>

pyproject.toml references license file

Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>

fixed completion directory location

Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>

fixed format and check-format. There is no longer a root .py file to check

Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>

newline at end of install-uv.sh

Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>

remove *.py from make lint flake8 command

Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>

added import for ModelStoreImport to main

Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>

attempt to consolidate main functions

Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>

lint

Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>

Make bin/ramalama executable

Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>

typo

Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-05-07 10:57:31 -05:00
Sergio Arroutbi
70806fa8ab Add coverage tools, run them via specific rules
Added new rules to install/run specific coverity tools:
* install-detailed-cov-requirements: Install basic coverage tools
* install-cov-requirements: Install extended coverage tools
* cov-tests: Execute basic coverage tools
* detailed-cov-tests: Execute extended coverage tools

Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
2025-05-07 11:44:59 +02:00
Daniel J Walsh
715dffbb53 Make --no-cache optional for make build
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-04-28 06:59:13 -04:00
Sergio Arroutbi
837b0c99c2 Fix minor issues
- Include test rule in global Makefile
- Use GO variable in doc/Makefile
- Ramalama->RamaLama

Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
2025-04-25 16:53:03 +02:00
Daniel J Walsh
c66e931b7a Allow building older versions of cuda
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-04-21 13:51:10 -04:00
Nathan Weinberg
082ed827f1 fix: add 'pipx' install to 'make install-requirements'
'make install-requirements' currently assumes 'pipx'
is installed in your env, but this may not be the case

add an explict install/upgrade command via pip

Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-04-11 10:04:33 -04:00
Eric Curtin
73c54bf34c Combine Vulkan, Kompute and CPU inferencing into one image
Less images to maintain, Vulkan is more mature and more widely
used than Kompute.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-03-27 15:17:44 +00:00
Eric Curtin
6416c9e3e9 Add ramalama client
Once we achieve feature parity with llama-run, we will more
tightly integrate this into RamaLama.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-03-20 17:30:38 +00:00
Brian
57f4a6097b Add software to support using rag in RamaLama
This PR just installs the python requirements needed to play with the
rag_framework.py file.

I have not added the docling support yet, since that would swell the
size of the images.  Will add that in a separate PR.

Also remove pragmatic and begin conversion to new rag tooling.

Signed-off-by: Brian <bmahabir@bu.edu>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-03-15 07:28:47 -04:00
Eric Curtin
f6eaeb6b49 python3 validator
We are encountering issues where newer python3 features are
breaking systems with older versions of python3, such as macOS,
this should ensure we validate this in CI.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-03-13 15:13:51 +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
2769347597 Extend make validate check to do more
It also does check-format now.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-03-07 12:24:38 +00:00
Daniel J Walsh
adc53fea4e Merge pull request #911 from leo-pony/main
Add support for llama.cpp engine to use ascend NPU device
2025-03-06 12:11:30 -05:00
leo-pony
93c023d4a7 Add code for ascend npu supporting for llama.cpp engine
Signed-off-by: leo-pony <nengjunma@outlook.com>
2025-03-06 17:25:46 +08: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
Eric Curtin
b027740e42 Switch from tiny to smollm:135m
This is probably a consequence of my slow network, but I switched
to smollm:135m, it's easier for demos. tiny was taking too long
to download.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-02-26 19:43:34 +00:00