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

106 Commits

Author SHA1 Message Date
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
Michael Engel
3622340635 Apply formatting and linting to unit tests
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-02-26 17:42:30 +01:00
Michael Engel
149086e043 Added unit tests for new model 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
Michael Engel
c21764e818 Introduced isort in the format make targets
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-02-15 15:00:56 +01:00
Michael Engel
73a74bea19 Refined formatting and linting
Split make target lint into lint, format and check-format
and updated the CI steps accordingly. Also moved configuration
of black to pyproject.toml and flake8 to .flake8 file.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-02-15 15:00:56 +01:00
Michael Engel
b31482cc8d Pin versions of the development tools to major version
By pinning the version of the development tools, the risk of
accidental upgrades and breaking changes leading are mitigated.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-02-15 14:56:13 +01:00
Daniel J Walsh
7f1e680b09 Attempt to use build_llama_and_whisper.sh
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-02-12 13:03:23 -05: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
Daniel J Walsh
c166c0a007 Begin process of packaging PRAGmatic
Building Pragmatic into a container image is fairly easy.

podman build --build-arg IMAGE=quay.io/ramalama/rocm -t quay.io/ramalama/rocm-rag container-images/pragmatic

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-02-05 14:07:56 -05:00
Charro Gruver
7ba4c953d1 Fix syntax error in Makefile
Signed-off-by: Charro Gruver <cgruver@redhat.com>
2025-02-04 19:47:47 +00:00
Charro Gruver
e7495266ec Modify Makefile to support multi-arch builds
Signed-off-by: Charro Gruver <cgruver@redhat.com>
2025-02-04 19:44:27 +00:00