Compare commits

...

653 Commits
v0.8.1 ... main

Author SHA1 Message Date
Daniel J Walsh 3f8e31a073
Merge pull request #1714 from slp/install-virglrenderer
container-images: add virglrenderer to vulkan
2025-07-19 06:35:54 -04:00
Daniel J Walsh 08722738cf
Merge pull request #1718 from containers/konflux/references/main
Update Konflux references
2025-07-19 06:34:54 -04:00
red-hat-konflux-kflux-prd-rh03[bot] ab7adbb430
Update Konflux references
Signed-off-by: red-hat-konflux-kflux-prd-rh03 <206760901+red-hat-konflux-kflux-prd-rh03[bot]@users.noreply.github.com>
2025-07-19 08:03:10 +00:00
Mike Bonnet 72504179fc
Merge pull request #1716 from containers/fix-sentencepiece-build
build_rag.sh: install cmake
2025-07-18 10:54:06 -07:00
Mike Bonnet dcfeee8538 build_rag.sh: install cmake
cmake is required to build sentencepiece.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-07-18 09:17:33 -07:00
Daniel J Walsh 1d903e746c
Merge pull request #1677 from containers/vllm-cpu
Add vllm to cpu inferencing Containerfile
2025-07-18 06:05:26 -04:00
Daniel J Walsh 13a22f6671
Merge pull request #1708 from containers/konflux-more-images
konflux: add pipelines for asahi, cann, intel-gpu, llama-stack, musa, openvino, and ramalama-cli
2025-07-18 06:04:12 -04:00
Daniel J Walsh 1d6aa51cd7
Merge pull request #1712 from tonyjames/main
Add support for Intel Iris Xe Graphics (46AA, 46A6, 46A8)
2025-07-18 06:03:34 -04:00
Tony James 50d01f177b Add support for Intel Iris Xe Graphics (46AA, 46A6, 46A8)
Signed-off-by: Tony James <3128081+tonyjames@users.noreply.github.com>
2025-07-17 18:58:07 -04:00
Eric Curtin 234134b5cc Add vllm to cpu inferencing Containerfile
To be built upon "ramalama" image

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-07-17 21:09:20 +01:00
Daniel J Walsh 64ca9cfb4a
Merge pull request #1709 from containers/fix-cuda-gpu
fix GPU selection and pytorch URL when building rag images
2025-07-17 11:31:41 -04:00
Eric Curtin e3dda75ec6
Merge pull request #1707 from rhatdan/install
README: remove duplicate statements
2025-07-17 15:57:12 +01:00
Daniel J Walsh 075df4bb87
Merge pull request #1617 from jwieleRH/check_nvidia
Improve NVIDIA GPU detection.
2025-07-17 06:29:40 -04:00
Daniel J Walsh 5b46b23f2e
README: remove duplicate statements
Simplify ramalama's top-level description. Remove the duplicate
statements.

Also make sure all references to PyPI are spelled this way.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-07-17 06:26:55 -04:00
Daniel J Walsh 1fe1b20c8c
Merge pull request #1711 from carlwgeorge/include-config-in-wheel
Included ramalama.conf in wheel
2025-07-17 06:21:47 -04:00
Mike Bonnet f5512c8f65 build_rag.sh: install sentencepiece via pip
python3-sentencepiece was pulling in an older version of protobuf.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-07-16 23:27:54 -07:00
Mike Bonnet 7132d5a7f8 build_rag.sh: disable pip cache
pip's caching behavior was causing errors when downloading huge (4.5G) torch wheels during
the rocm-ubi-rag build.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-07-16 23:27:54 -07:00
Mike Bonnet 2d3f8dfe28 fix GPU selection and pytorch URL when building rag images
A previous commit changed the second argument to add_rag() from the image name to the
full repo path. Update the case statement accordingly, so the "GPU" variable is set correctly.

The "cuda" directory is no longer available on download.pytorch.org. When building for cuda,
pull wheels from the "cu128" directory, which contains binaries built for CUDA 12.8.

When building rocm* images, download binaries from the "rocm6.3" directory, which are built
for ROCm 6.3.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-07-16 23:27:54 -07:00
Carl George 1d8a2e5b6c Included ramalama.conf in wheel
Currently other data files such as shortnames.conf, man pages, and shell
completions are included in the Python wheel.  Including ramalama.conf
as well means we can avoid several calls to make in the RPM spec file,
instead relying on the wheel mechanisms to put these files in place.  As
long as `make docs` is run before the wheel generation, all the
necessary files are included.

Signed-off-by: Carl George <carlwgeorge@gmail.com>
2025-07-17 01:20:28 -05:00
Eric Curtin 42ac787686
Merge pull request #1710 from containers/konflux/mintmaker/main/registry.access.redhat.com-ubi9-ubi-9.x
chore(deps): update registry.access.redhat.com/ubi9/ubi docker tag to v9.6-1752625787
2025-07-17 01:15:43 +01:00
red-hat-konflux-kflux-prd-rh03[bot] 18c560fff6
chore(deps): update registry.access.redhat.com/ubi9/ubi docker tag to v9.6-1752625787
Signed-off-by: red-hat-konflux-kflux-prd-rh03 <206760901+red-hat-konflux-kflux-prd-rh03[bot]@users.noreply.github.com>
2025-07-17 00:03:57 +00:00
John Wiele ce35ccb4c3 Remove pyYAML as a dependency.
Extract information directly from the CDI YAML file by making some
simplifying assumptions instead of doing a complete YAML parse.

Default to all devices known to nvidia-smi.

Fix the signature of check_nvidia().

Remove some debug logging.

Signed-off-by: John Wiele <jwiele@redhat.com>
2025-07-16 16:11:39 -04:00
John Wiele b97177b408 Apply suggestions from code review
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Signed-off-by: John Wiele <jwiele@redhat.com>
2025-07-16 16:08:32 -04:00
John Wiele 14c4aaca39 Improve NVIDIA GPU detection.
Allow GPUs to be specified by UUID as well as index since the index is
not guaranteed to persist across reboots.

Crosscheck requested GPUs with nvidia-smi and CDI configuration. If
any requested GPUs lack corresponding CDI configuration, print a
message with a pointer to documentation.

If the only GPU specified in the CDI configuration is "all", as
appears to be the case on WSL2, use "all" as the default.

Add an optional encoding argument to run_cmd() to facilitate checking
the output of the command.

Add pyYAML as a dependency for parsing the CDI configuration.

Signed-off-by: John Wiele <jwiele@redhat.com>
2025-07-16 16:08:32 -04:00
Mike Bonnet bf4fd56106 konflux: add pipelines for asahi, cann, intel-gpu, llama-stack, musa, openvino, and ramalama-cli
Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-07-16 12:23:12 -07:00
Mike Bonnet 1373a8e7ba konflux: don't trigger pipelines on PR transition to "Ready for Review"
By default, Konflux triggers new pipelines when a PR moves from Draft to
"Ready for Review". Because the commit SHA hasn't changed, no new builds
are performed. However, a new integration test is also triggered, and because
no builds were performed it is unable to find the URL and digest of the images,
causing the integration test to fail. Updating the "on-cel-expression" to exclude
the transition to "Ready to Review" avoids the unnecessary pipelines and the
false integration test failures.

Update the whitespace of the "on-cel-expression" in the push pipelines for consistency.
No functional change.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-07-16 12:11:54 -07:00
Sergio Lopez 74584d0b5e container-images: add virglrenderer to vulkan
When running in a krun-isolated container, we need
"/usr/libexec/virgl_render_server" to be present in the container
image to launch it before entering the microVM.

Install the virglrenderer package in addition to mesa-vulkan-drivers.

Signed-off-by: Sergio Lopez <slp@redhat.com>
2025-07-16 18:53:11 +02:00
Daniel J Walsh 4dea2ee02f
Merge pull request #1687 from containers/konflux-cuda-arm64
konflux: build cuda on arm64, and simplify testing
2025-07-16 12:01:45 -04:00
Mike Bonnet 069e98c095 fix unit tests to be independent of environment
Setting RAMALAMA_IMAGE would cause some unit tests to fail. Make those
tests independent of the calling environment.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-07-16 06:44:00 -07:00
Mike Bonnet f57b8eb284 konflux: copy source into the bats image
Including the source in the bats image ensures that we're always testing with the same
version of the code that was used to build the images. It also eliminates the need for
repeated checkouts of the repo and simplifies testing, avoiding additional volumes and
artifact references.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-07-16 06:44:00 -07:00
Mike Bonnet 299d3b9b75 konflux: build cuda and layered images on arm64
Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-07-16 06:44:00 -07:00
Stephen Smoogen 683b8fb8a0
Minor fixes to rpm builds by packit and spec file. (#1704)
* This removes epel9 from packit rules as epel9 does not currently
  build without many additional packages added to the distro.
* This fixes a breakage in epel10 by adding mailcap as a buildrequires.

Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>
Co-authored-by: Stephen Smoogen <ssmoogen@redhat.com>
2025-07-16 09:37:00 -04:00
Mike Bonnet 64e22ee0aa
Merge pull request #1700 from containers/test-optimization-and-fixup
reduce unnecessary image pulls during testing, and re-enable a couple tests
2025-07-15 11:34:59 -07:00
Mike Bonnet 651fc503bd implement "ps --noheading" for docker using --format
"docker ps" does not support the "--noheading" option. Use the --format
option to emulate the behavior.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-07-15 10:32:53 -07:00
Daniel J Walsh 384cad7161
Merge pull request #1696 from containers/renovate/quay.io-konflux-ci-build-trusted-artifacts-latest
chore(deps): update quay.io/konflux-ci/build-trusted-artifacts:latest docker digest to f7d0c51
2025-07-15 13:17:33 -04:00
Daniel J Walsh 3dec0d7487
Merge pull request #1699 from containers/renovate/registry.access.redhat.com-ubi9-ubi-9.x
chore(deps): update registry.access.redhat.com/ubi9/ubi docker tag to v9.6-1752587049
2025-07-15 13:16:27 -04:00
Daniel J Walsh d7763ad1c5
Merge pull request #1698 from containers/mistral
Mistral should point to lmstudio gguf
2025-07-15 13:15:11 -04:00
Mike Bonnet b550cc97d2 bats: re-enable a couple tests, and minor cleanup
Fix the "serve and stop" test by passing the correct (possibly random) port to "ramalama chat".

Fix the definition of "ramalama_runtime".

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-07-15 09:03:49 -07: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
Mike Bonnet f176bb3926 add a dryrun field to Config, and set it early
accel_image() is called to set option defaults, before options are even parsed.
This can cause images to be pulled even if they will not actually be used, slowing
down testing and making the cli less responsive. Set the "dryrun" option before
the first call to accel_image() to avoid unnecessary image pulls.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-07-15 09:03:49 -07:00
renovate[bot] f38c736d23
chore(deps): update registry.access.redhat.com/ubi9/ubi docker tag to v9.6-1752587049
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-15 15:47:38 +00:00
Eric Curtin fa2f485175 Mistral should point to lmstudio gguf
I don't know who MaziyarPanahi is, but I know who lmstudio are

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-07-15 15:04:54 +01:00
Mike Bonnet f8c41b38c1 avoid unnecessary image pulls
Don't pull images in _get_rag() and _get_source_model() if pull == "never"
or if running with "--dryrun".

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-07-14 14:42:21 -07:00
renovate[bot] b7323f7972
chore(deps): update quay.io/konflux-ci/build-trusted-artifacts:latest docker digest to f7d0c51
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 20:13:34 +00:00
Daniel J Walsh 53e38dea8f
Merge pull request #1694 from rhatdan/VERSION
Bump to 0.11.0
2025-07-14 10:59:06 -04:00
Daniel J Walsh bf68cfddd3
Bump to 0.11.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-07-14 10:32:32 -04: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
Daniel J Walsh eba46c8df6
Merge pull request #1691 from mbortoli/readme-improvements
Readme improvements: Update model's name and improve CUDA_VISIBLE_DEVICES section
2025-07-14 10:03:20 -04:00
Mario Antonio Bortoli Filho b5826c96e9 README: fix model name and improve CUDA section
- Corrected the model name under the Benchmark section; previous name was not available in Ollama's registry.

- Added instructions to switch between CPU-only mode and using all available GPUs via CUDA_VISIBLE_DEVICES.

Signed-off-by: Mario Antonio Bortoli Filho <mario@bortoli.dev>
2025-07-14 09:43:16 -03:00
Daniel J Walsh 066b659f3a
Merge pull request #1689 from containers/pip-install
Only install if pyproject.toml exists
2025-07-14 06:07:24 -04:00
Eric Curtin 6d7effadc2 Only install if pyproject.toml exists
Otherwise skip

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-07-13 22:13:11 +01:00
Daniel J Walsh 1d2e1a1e01
Merge pull request #1688 from containers/konflux/references/main
chore(deps): update konflux references
2025-07-12 06:06:35 -04:00
Daniel J Walsh a54e2b78c4
Merge pull request #1681 from ramalama-labs/bug/chat-fix
Bug/chat fix
2025-07-12 06:05:31 -04:00
red-hat-konflux-kflux-prd-rh03[bot] f4cec203ac
chore(deps): update konflux references
Signed-off-by: red-hat-konflux-kflux-prd-rh03 <206760901+red-hat-konflux-kflux-prd-rh03[bot]@users.noreply.github.com>
2025-07-12 08:02:23 +00:00
Ian Eaves a616005695
resolve merge conflicts
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-07-11 16:47:56 -05:00
Daniel J Walsh c7c0f7d2e5
Merge pull request #1685 from rhatdan/convert
Allow `ramalama rag` to output different formats
2025-07-11 16:18:19 -04:00
Daniel J Walsh b630fcdea2
Allow ramalama rag to output different formats
Add ramalama rag --format option to allow outputing
of markdown, json as well as qdrant databases.

This content can then be used as input to the client tool.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Co-authored-by: Ian Eaves <ian.k.eaves@gmail.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-07-11 11:04:32 -04:00
Daniel J Walsh 027f88cf31
Merge pull request #1683 from containers/konflux-integration
konflux: add integration tests that run in multi-arch VMs
2025-07-10 15:05:03 -04:00
Mike Bonnet d7ed2216dd konflux: build entrypoint images on smaller instances
The entrypoint image builds are very lightweight, use smaller instances
to reduce resource consumption.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-07-10 09:19:16 -07:00
Mike Bonnet 6d9a7eea9e konflux: build rag images on instance types with more disk space
-rag builds were failing due to the 40G disk filling up. Run builds on
newly-available "d160" instance types which have 160G of disk space
available.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-07-10 09:19:16 -07:00
Mike Bonnet 5ebc48f453 konflux: add integration tests that run in multi-arch VMs
The integration tests will be triggered after all image builds associated with a single
commit are complete. Tests are currently being run on amd64 and arm64 platforms.

Remove "bats-nocontainer" from the build-time tests, since those are covered by "bats" run
in the integration tests.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-07-10 09:19:16 -07:00
Mike Bonnet b6cb2fdbe2 konflux: build all ramalama layered images on arm64
Some bats tests need the ramalama-rag image avilable for the current arch. Build
all the ramalama layered images on arm64 as well as amd64.

Switch to building on larger VM instance types to reduce build times and improve
developer feedback and experience.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-07-10 06:44:58 -07:00
Mike Bonnet f75599097e bats: ignore RAMALAMA_IMAGE from the calling environment
Some tests parse the output of the ramalama cli and hard-code the location of the expected
default image. However, this output changes based on the value of the RAMALAMA_IMAGE
environment variable, and setting this variable in the calling environment can cause those
tests to fail. Unset the RAMALAMA_IMAGE environment variable in these tests to avoid false failures.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-07-10 06:44:58 -07:00
Daniel J Walsh 80317bffbc
Merge pull request #1684 from containers/konflux/mintmaker/main/registry.access.redhat.com-ubi9-ubi-9.x
chore(deps): update registry.access.redhat.com/ubi9/ubi docker tag to v9.6-1752069608
2025-07-10 07:45:47 -04:00
red-hat-konflux-kflux-prd-rh03[bot] 124afc14bb
chore(deps): update registry.access.redhat.com/ubi9/ubi docker tag to v9.6-1752069608
Signed-off-by: red-hat-konflux-kflux-prd-rh03 <206760901+red-hat-konflux-kflux-prd-rh03[bot]@users.noreply.github.com>
2025-07-10 00:02:12 +00:00
Daniel J Walsh 79b23e1237
Merge pull request #1668 from containers/renovate/registry.access.redhat.com-ubi9-ubi-9.x
Update registry.access.redhat.com/ubi9/ubi Docker tag to v9.6-1752069608
2025-07-09 16:04:00 -04:00
Daniel J Walsh 5fd301532c
Merge pull request #1679 from containers/bugfix-for-chat
Bugfix for chat
2025-07-09 16:03:14 -04:00
Daniel J Walsh 64d53180fd
Merge pull request #1680 from nathan-weinberg/bump-er
chore: bump ramalama-stack to 0.2.5
2025-07-09 16:01:09 -04:00
Daniel J Walsh c0278c1b8c
Merge pull request #1676 from rhatdan/selinux
Enable SELinux separation
2025-07-09 16:00:35 -04:00
Nathan Weinberg e402a456cf chore: bump ramalama-stack to 0.2.5
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-07-09 15:42:33 -04:00
Eric Curtin 3da38bc7b8 Bugfix for chat
This was recently removed:

+            if getattr(self.args, "model", False):
+                data["model"] = self.args.model

it is required

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-07-09 20:13:09 +01:00
Daniel J Walsh 980179d5ca
Enable SELinux separation
Remove some unused functions from model.py

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-07-09 13:11:58 -04:00
Daniel J Walsh 657bacb52e
Merge pull request #1675 from rhatdan/image
Hide --container option, having --container/--nocontainer is confusing
2025-07-09 09:55:44 -04:00
Daniel J Walsh 09c6ccb2f0
Hide --container option, having --container/--nocontainer is confusing
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-07-09 06:58:04 -04:00
Daniel J Walsh 7f09d4bf5b
Merge pull request #1643 from engelmi/enhance-ref-file
Enhance ref file and mount all snapshot files to container
2025-07-08 13:37:45 -04:00
Michael Engel 7a6c9977f7 Disable generate and serve OCI image test
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-07-08 18:36:39 +02:00
Michael Engel def6116f15 Add deduplication check by file hash to update_snapshot
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-07-08 18:33:42 +02:00
Michael Engel 5e39e11678 Remove limitation of only one model file per snapshot
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-07-08 18:33:42 +02:00
Michael Engel 21e42fc837 Move split model logic to url model class
The split model feature was exclusive to URL models. Because of this - and the
improvements in mounting all model snapshot files - the logic has been removed
from the ModelFactory and put to the URL model class.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-07-08 18:33:42 +02:00
Michael Engel eefafe24fd Refactor model classes to mount all snapshot files instead of explicit ones
Previously, the model, mmproj and chat template files were mounted explicity if
present using many if-exists checks. Relying on the new ref file all files of that
model snapshot are either mounted or used directly with its blob path. When mounted
into a container, the files are put into MNT_DIR with the respective file names.
The split_model part has been dropped for now, but will be refactored in the next
commit.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-07-08 18:33:42 +02:00
Michael Engel 6cbaf692aa Remove obsolete glob check if model exists
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-07-08 18:33:42 +02:00
Michael Engel 129ee175d6 Fixed using model_store instead of store
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-07-08 18:33:42 +02:00
Michael Engel 8e98c77f54 Removed unused functio
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-07-08 18:33:42 +02:00
Michael Engel e398941913 Remove unused garbage collection function
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-07-08 18:33:42 +02:00
Michael Engel d95bd13ca0 Replace RefFile by RefJSONFile in model store
Replacing the use of RefFile with the new RefJSONFile in model store. It also adds
support for adhoc migration of old to new ref file format.
This will break ramalama as is since no specific functionality for getting the explicit
(gguf) model file path has been implemented. Will be adjusted in the next commit to
fix this.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-07-08 18:33:42 +02:00
Michael Engel 496439ea02 Added new ref file format
Added a new, simpler ref file format serialized as JSON. It also gets additional
fields such as the hash of the file that is used as the name of the blob file.
This essentially makes the snapshot directory and all symlinks obsolete, further
simplifying the storage and improving stability. It also leads to the ref file as
being the single source for all files of a model.
Further refactoring, incl. swapping and migrating from the old to new format, will
follow in subsequent commits.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-07-08 18:33:42 +02:00
Daniel J Walsh bf0af8034a
Merge pull request #1673 from containers/mlx-fixes
mlx fixes
2025-07-08 11:51:26 -04:00
Daniel J Walsh 99f56a7684
Merge pull request #1669 from rhatdan/image
move --image & --keep-groups to run, serve, perplexity, bench commands
2025-07-08 11:49:07 -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 957dfd52e7
Merge pull request #1672 from containers/revert-1671-set-ramalama-stack-version
Revert "feat: allow for dynamic version installing of ramalama-stack"
2025-07-08 14:54:23 +01:00
Eric Curtin ebb8ea93fd
Revert "feat: allow for dynamic version installing of ramalama-stack" 2025-07-08 14:53:25 +01:00
Daniel J Walsh 7dc3d9da8e
move --image & --keep-groups to run, serve, perplexity, bench commands
This eliminates the need for pulling images by accident when not
using containers.  Since these commands are only used for container
commands, no need for them in other places.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-07-08 09:09:41 -04:00
Daniel J Walsh 72aa795b17
Merge pull request #1666 from engelmi/inspect-add-safetensor-support
Inspect add safetensor support
2025-07-08 08:54:15 -04:00
Eric Curtin 2fea5f86f6
Merge pull request #1671 from nathan-weinberg/set-ramalama-stack-version
feat: allow for dynamic version installing of ramalama-stack
2025-07-08 13:39:00 +01:00
Michael Engel 412d5616d3
Catch error on creating snapshot and log error
Relates to: https://github.com/containers/ramalama/issues/1663

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-07-08 12:57:12 +02:00
Michael Engel 3b880923c0
Added support for safetensors to inspect command
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-07-08 12:57:12 +02:00
Daniel J Walsh b7c15ce86a
Merge pull request #1664 from containers/konflux/references/main
chore(deps): update konflux references
2025-07-08 06:48:46 -04:00
Daniel J Walsh 87287ae574
Merge pull request #1670 from containers/konflux/mintmaker/main/registry.access.redhat.com-ubi9-ubi-9.x
Update registry.access.redhat.com/ubi9/ubi Docker tag to v9.6-1751897624
2025-07-08 06:43:49 -04:00
Nathan Weinberg eeaab7276c feat: allow for dynamic version installing of ramalama-stack
previously we were setting an explicit version of `ramalama-stack`
in the Containerfile restricting what we used at runtime

moved the install to the entrypoint script and allowed the use of
the RAMALAMA_STACK_VERSION env var to install a specific version
(default with no env var installs the latest package and pulls the
YAML files from the main branch)

Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-07-07 21:38:30 -04:00
red-hat-konflux-kflux-prd-rh03[bot] 8104b697dd
Update registry.access.redhat.com/ubi9/ubi Docker tag to v9.6-1751897624
Signed-off-by: red-hat-konflux-kflux-prd-rh03 <206760901+red-hat-konflux-kflux-prd-rh03[bot]@users.noreply.github.com>
2025-07-08 00:05:41 +00:00
renovate[bot] eacaffe03d
Update registry.access.redhat.com/ubi9/ubi Docker tag to v9.6-1751897624
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-07 19:49:58 +00:00
Daniel J Walsh 21957b22c2
Merge pull request #1661 from ramalama-labs/feat/vision
Adds the ability to include vision based context to chat via --rag
2025-07-07 09:36:52 -04:00
Daniel J Walsh cd7220a3ea
Merge pull request #1667 from rhatdan/VERSION
Bump to v0.10.1
2025-07-07 08:19:41 -04:00
Daniel J Walsh fe3731dffc
Bump to v0.10.1
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-07-07 06:52:23 -04:00
Eric Curtin 0947e11f13
Merge pull request #1665 from rhatdan/pull
Make sure errors and progress messages go to STDERR
2025-07-06 14:58:38 +01:00
Daniel J Walsh ab4d0f2202
Make sure errors and progress messages go to STDERR
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-07-06 07:12:14 -04:00
Daniel J Walsh c62a2a4e5b
Move download_file to http_client rather then common
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-07-06 06:52:51 -04:00
red-hat-konflux-kflux-prd-rh03[bot] ee8d7a3a04
chore(deps): update konflux references
Signed-off-by: red-hat-konflux-kflux-prd-rh03 <206760901+red-hat-konflux-kflux-prd-rh03[bot]@users.noreply.github.com>
2025-07-05 08:02:20 +00:00
Daniel J Walsh c9f9f691aa
Merge pull request #1642 from kush-gupt/feat/mlx
MLX runtime support
2025-07-04 05:53:41 -04:00
Ian Eaves fe2d22c848
renamed tests + lint
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-07-03 17:47:02 -05:00
Ian Eaves cba091b265
adds vision to chat
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-07-03 17:37:11 -05:00
Kush Gupta bc92481a66 Fix API request
Signed-off-by: Kush Gupta <kushalgupta@gmail.com>
2025-07-03 10:18:26 -04:00
Eric Curtin 149c9f101c
Merge pull request #1660 from telemaco/pre-commit-conf
Add .pre-commit-config.yaml
2025-07-03 14:54:26 +01:00
Eric Curtin 06488b45f1
Merge pull request #1637 from rhatdan/store
Always use absolute path for --store option
2025-07-03 14:33:44 +01:00
Eric Curtin 4482803eb2
Merge pull request #1657 from containers/konflux-layered-images
konflux: add pipelines for the layered images of ramalama, cuda, rocm, and rocm-ubi
2025-07-03 14:32:37 +01:00
Kush Gupta 277cb4f504 make sure host is not in container, dont care about llama.cpp args
Signed-off-by: Kush Gupta <kushalgupta@gmail.com>
2025-07-03 09:27:15 -04:00
Kush Gupta d77b7ce231 mlx runtime with client/server
Signed-off-by: Kush Gupta <kushalgupta@gmail.com>
2025-07-03 09:27:00 -04:00
Roberto Majadas 5a51552d1f Add pre-commit configuration
Signed-off-by: Roberto Majadas <rmajadas@redhat.com>
2025-07-03 14:40:49 +02:00
Daniel J Walsh 8501240d43
Merge pull request #1659 from telemaco/lint-and-format-conf-updates
Update lint and format tools configuration
2025-07-03 07:12:52 -04:00
Eric Curtin c791ac1602
Merge pull request #1658 from containers/konflux/mintmaker/main/registry.access.redhat.com-ubi9-ubi-9.x
chore(deps): update registry.access.redhat.com/ubi9/ubi docker tag to v9.6-1751445649
2025-07-03 11:45:32 +01:00
Daniel J Walsh 689955480c
Always use absolute path for --store option
Fixes: https://github.com/containers/ramalama/issues/1634

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-07-03 06:38:57 -04: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
Daniel J Walsh ae38e3f09c
Merge pull request #1632 from ramalama-labs/feat/user-prompt-configs
Adds a user configuration setting to disable gpu prompting
2025-07-03 06:30:52 -04:00
Daniel J Walsh c32d67fd4e
Merge pull request #1635 from containers/list-models
Add command to list available models
2025-07-03 06:23:35 -04:00
red-hat-konflux-kflux-prd-rh03[bot] 9c43c0ba71
chore(deps): update registry.access.redhat.com/ubi9/ubi docker tag to v9.6-1751445649
Signed-off-by: red-hat-konflux-kflux-prd-rh03 <206760901+red-hat-konflux-kflux-prd-rh03[bot]@users.noreply.github.com>
2025-07-03 00:03:59 +00:00
Ian Eaves 27fa3909a3
adds user prompt controls
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-07-02 16:58:37 -05:00
Mike Bonnet 0808cf76b9 konflux: add pipelines for the layered images of ramalama, cuda, rocm, and rocm-ubi
Build the -llama-server, -whisper-server, and -rag layered images, which inherit from
the existing ramalama, cuda, rocm, and rocm-ubi images.

Layered images use shared Containerfiles, and customize their builds using --build-arg.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-07-02 12:19:25 -07:00
Eric Curtin 3a61309e10 Add command to list available models
With commands such as:

  ramalama chat --url https://generativelanguage.googleapis.com/v1beta/openai --ls

we can now list the various models available.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-07-02 16:52:28 +01:00
Eric Curtin 8dc1144cbd
Merge pull request #1641 from containers/layered-containerfiles
build layered images from Containerfiles
2025-07-02 10:19:32 +01:00
Mike Bonnet 46c0154d2a build layered images from Containerfiles
Move the Containerfiles for the entrypoint and rag images out of container_build.sh and into their
own files. This is necessary so they can be built with Konflux.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-07-01 15:14:26 -07:00
Eric Curtin e624a41063
Merge pull request #1631 from jbtrystram/fix_quadlet
quadlet: add missing privileged options
2025-07-01 22:38:16 +01:00
jbtrystram 412372de9c
quadlet: use shlex to join shell arguments
this is to avoid incorrect parsing if arguments contain spaces.

See https://github.com/containers/ramalama/pull/1631#discussion_r2175358681

Signed-off-by: jbtrystram <jbtrystram@redhat.com>
2025-07-01 22:34:06 +02:00
jbtrystram a3a199664c
quadlet: add missing privileged options
The default privileged options were ommited from the generated quadlet
file. Add them using the same argument parsing as in engine.py. [1]

Also add a few base options found in model.py[2] that were missing.

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

[1] 8341ddcf7b/ramalama/engine.py (L71-L82)
[2] 8341ddcf7b/ramalama/model.py (L205-L223)

Signed-off-by: jbtrystram <jbtrystram@redhat.com>
2025-07-01 22:33:21 +02:00
Daniel J Walsh 58922cd285
Merge pull request #1638 from engelmi/use-config-for-pull-flag-in-accel-image
Use config instance for defining pull behavior in accel_image
2025-07-01 14:39:49 -04:00
Daniel J Walsh 5468b1b4c7
Merge pull request #1639 from nathan-weinberg/rlls-0.2.4
chore: bump ramalama-stack to 0.2.4
2025-07-01 14:33:15 -04:00
Nathan Weinberg 1dad8284b7 chore: bump ramalama-stack to 0.2.4
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-07-01 14:28:10 -04:00
Daniel J Walsh fe756ccf70
Merge pull request #1640 from engelmi/split-model-store-into-files
Split the model store into multiple files
2025-07-01 14:24:22 -04:00
Michael Engel d7ecda282b
Added staticmethod annotation
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-07-01 17:45:51 +02:00
Michael Engel 3327df7852
Split the model store into multiple files
The source code for the model store is getting bigger, so splitting it
into multiple source files under a directory helps keeping it easier
to read.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-07-01 17:41:34 +02:00
Michael Engel 4a5724e673
Use config instance for defining pull behavior in accel_image
By using the pull field in the config instance for the flag to
indicate pulling of the container image should be attempted in
the accel_image function, the behavior is tied to the cli options.
This also prevents a ramalama ls to seemingly block since the
image is downloaded (with no output).

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-07-01 15:24:54 +02:00
Daniel J Walsh 162e2e5991
Merge pull request #1614 from containers/konflux-tests
run tests during build pipelines
2025-07-01 06:55:33 -04:00
Daniel J Walsh 3b11fcf343
Merge pull request #1633 from containers/konflux/mintmaker/main/registry.access.redhat.com-ubi9-ubi-9.x
chore(deps): update registry.access.redhat.com/ubi9/ubi docker tag to v9.6-1751287003
2025-07-01 06:37:26 -04:00
Eric Curtin 34eae809b6
Merge pull request #1620 from olliewalsh/store_delete_refcount
Fix modelstore deleting logic when multiple reference refer to the same blob/snapshot
2025-07-01 09:42:46 +01:00
red-hat-konflux-kflux-prd-rh03[bot] 1e346cc083
chore(deps): update registry.access.redhat.com/ubi9/ubi docker tag to v9.6-1751287003
Signed-off-by: red-hat-konflux-kflux-prd-rh03 <206760901+red-hat-konflux-kflux-prd-rh03[bot]@users.noreply.github.com>
2025-07-01 00:03:13 +00:00
Oliver Walsh 7b211d0aef Only remove .parial blob file when the snapshot refcount is 0
Previously would always remove this partial blob file.

Note: this assumes the blob hash equals the snapshot hash, which
is only true for repos with a single model

Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2025-06-30 23:30:35 +01:00
Oliver Walsh 80fd6d95fe Handle existing but broken symlink to snapshot file
Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2025-06-30 23:11:41 +01:00
Oliver Walsh 69e0929ca0 Add bats tests for pullling llama.cpp multimodal images
Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2025-06-30 23:11:41 +01:00
Oliver Walsh 990a7412e8 Fix modelstore deleting logic
When deleting a reference, count the remaining references to the
snapshot/blobs to determine if they should be deleted.

Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2025-06-30 23:11:41 +01:00
Mike Bonnet 8b1d2c03cd konflux: skip checks on PR builds
Most of the checks don't (yet) apply to these images, and they add significant time to the builds.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-06-30 12:11:13 -07:00
Mike Bonnet 36e55002fe konflux: set PipelineRun timeouts to 6 hours
Container builds and tests can take a long time. We'd rather them eventually complete successfully
than fail with a timeout.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-06-30 12:11:13 -07:00
Mike Bonnet ee05ed0586 run tests during build pipelines
Use the bats container to run a set of Makefile targets to test the code
and images in parallel.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-06-30 12:11:13 -07:00
Stephen Smoogen 8341ddcf7b
Start process of moving python-ramalama to ramalama (#1498)
* 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>

---------

Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>
Co-authored-by: Stephen Smoogen <ssmoogen@redhat.com>
2025-06-30 14:51:29 +01:00
Eric Curtin afbb01760f
Merge pull request #1628 from rhatdan/host
Fix handling of --host option when running in a container
2025-06-30 13:58:46 +01:00
Daniel J Walsh 1270b7fba6
Merge pull request #1629 from rhatdan/VERSION
Bump to v0.10.0
2025-06-30 08:31:07 -04:00
Daniel J Walsh 8d054ff751
Bump to v0.10.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-30 08:29:27 -04:00
Daniel J Walsh 67b3d6ebba
Merge pull request #1627 from containers/konflux/references/main
chore(deps): update konflux references
2025-06-30 05:14:15 -04:00
Daniel J Walsh bc561d2597
Merge pull request #1570 from ieaves/feat/file-upload
Adds the ability to pass files to `ramalama run`
2025-06-29 05:36:00 -04:00
Ian Eaves 1f03de03f8
Add file upload feature
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-06-28 21:18:16 -05:00
Daniel J Walsh 6b13f497fa
Fix handling of --host option when running in a container
When you run a Model server within a container and only wanted it bound
to a certain port, the port binding should happen to the container not
inside of the container.

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

Also fix handling of -t option, should not be used with anything other
then run command, and now I am not sure of that.

The LLAMA_PROMPT_PREFIX= environment variable should not be set within
containers as an environment variable, since we are doing chat on the
outside.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-28 11:48:24 -04:00
red-hat-konflux-kflux-prd-rh03[bot] f5298105e3
chore(deps): update konflux references
Signed-off-by: red-hat-konflux-kflux-prd-rh03 <206760901+red-hat-konflux-kflux-prd-rh03[bot]@users.noreply.github.com>
2025-06-28 08:03:12 +00:00
Daniel J Walsh 7e1d159a3b
Merge pull request #1624 from containers/gemma3n-alias
Add gemma aliases
2025-06-27 10:36:26 -04:00
Daniel J Walsh ca9885ac99
Merge pull request #1623 from containers/bump-llamacpp2
Want to pick up support for gemma3n
2025-06-27 10:35:53 -04:00
Eric Curtin b42eb5762d
Merge pull request #1621 from sarroutbi/202506271328-fix-unit-tests-for-machines-running-gpus
Fix unit tests for machines with GPUs
2025-06-27 15:32:46 +01:00
Eric Curtin 089589cdfe Add gemma aliases
The ollama variants are incompatible

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-27 15:28:00 +01:00
Eric Curtin 289e682f2a Want to pick up support for gemma3n
And the other latest and greatest llama.cpp features

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-27 15:06:32 +01:00
Sergio Arroutbi 8ab3ce3f56
Fix test_common to use expected image
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
2025-06-27 16:03:36 +02:00
Sergio Arroutbi 146a5d011a
Fix quadlet tests to pass on a machine with GPU
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
2025-06-27 13:44:21 +02:00
Daniel J Walsh 895fb0d1dd
Merge pull request #1588 from rhatdan/llama-stack
Fixup to work with llama-stack
2025-06-27 07:22:24 -04:00
Daniel J Walsh e0108b9d34
Merge pull request #1616 from nathan-weinberg/rlls-0.2.3
chore: bump ramalama-stack to 0.2.3
2025-06-27 06:41:28 -04:00
Daniel J Walsh 1c87479aee
Fixes to work with llama-stack
Adapt ramalama stack and chat modules for compatibility with llama-stack by updating host binding, argument formatting, and command invocation patterns, and add robust attribute checks in the chat utility.

Bug Fixes:

    Add hasattr checks around optional args (pid2kill, name) in chat kills() to prevent attribute errors

Enhancements:

    Bind model server to 0.0.0.0 instead of localhost for external accessibility
    Convert port, context size, and thread count arguments to strings for consistent CLI usage
    Reformat container YAML to use JSON array and multiline args for llama-server and llama-stack commands
    Update Containerfile CMD to JSON exec form for llama-stack entrypoint

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-27 05:57:45 -04:00
Eric Curtin b2cd9dc36e
Merge pull request #1610 from rhatdan/url
Fix removing of file based URL models
2025-06-27 08:46:40 +01:00
Eric Curtin faacef5ea5
Merge pull request #1615 from rhatdan/build
Free up disk space for building all images
2025-06-27 08:45:55 +01:00
Eric Curtin a019b91b8a
Merge pull request #1619 from carlwgeorge/zsh-completions
Use standard zsh completion directory
2025-06-27 08:43:47 +01: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
Nathan Weinberg 00a5f084b4 chore: bump ramalama-stack to 0.2.3
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-06-26 16:13:21 -04:00
Daniel J Walsh 93d23c93e6
Free up disk space for building all images
Were using Podman to build images, so don't futz with Docker.

only build base images, not as necessary to build RAG Images.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-26 16:06:54 -04:00
Daniel J Walsh 8c2bc88284
Fix removing of file based URL models
Currently we are incorrectly reporting file models as
file://PATH as opposed to the correct file:///PATH.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-26 15:44:29 -04:00
Daniel J Walsh 370f1ccc1c
Merge pull request #1611 from ktdreyer/nopull
rename "nopull" boolean to "pull"
2025-06-26 14:57:23 -04:00
Daniel J Walsh c98c3a0cb4
Merge pull request #1612 from containers/konflux-bats
konflux: build bats image
2025-06-26 13:27:42 -04:00
Ken Dreyer f9e6fed54a rename "nopull" boolean to "pull"
Rename "nopull" to "pull" for improved clarity and readability. This
avoids the double-negative, making the logic more straightforward to
reason about. "pull = True" now means "pull the image", "pull = False"
means "don't pull the image."

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2025-06-26 13:06:34 -04:00
Mike Bonnet 7f05324a7a bats: only install ollama on x86_64
Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-06-26 08:10:45 -07:00
Mike Bonnet 0f4c0fee43 konflux: bats: use shared pipelines
Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-06-26 07:43:59 -07:00
red-hat-konflux-kflux-prd-rh03 27460c5c97 Red Hat Konflux kflux-prd-rh03 update bats
Signed-off-by: red-hat-konflux-kflux-prd-rh03 <konflux@no-reply.konflux-ci.dev>
2025-06-26 14:06:56 +00:00
Daniel J Walsh aa1e4f1f30
Merge pull request #1603 from slp/pin-copr-mesa
container-images: pin mesa version to COPR
2025-06-26 09:38:31 -04:00
Daniel J Walsh 0f90023a52
Merge pull request #1609 from rhatdan/build
Separate build image into its own VM
2025-06-26 09:36:59 -04:00
Daniel J Walsh d4e76d3638
Merge pull request #1598 from containers/bats-container
add support for running bats in a container
2025-06-26 09:36:35 -04:00
Eric Curtin 61efb04416
Merge pull request #1605 from rhatdan/chat
Switchout hasattr for getattr wherever possible
2025-06-26 14:27:22 +01:00
Eric Curtin 932a1d8c08
Merge pull request #1607 from engelmi/prune-model-store-code
Prune model store code

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-26 09:21:03 -04:00
Daniel J Walsh de46cd16c7
Separate build image into its own VM
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-26 09:12:27 -04:00
Eric Curtin 9140476c7d
Merge pull request #1607 from engelmi/prune-model-store-code
Prune model store code
2025-06-26 13:24:09 +01:00
Sergio Lopez 385a992e2b container-images: pin mesa version to COPR
When building on Fedora systems make sure we install the
mesa version from the COPR, which has the patches to force
alignment to 16K (needed for GPU acceleration on macOS, but
harmless to other systems).

We also need to add "--nobest" to "dnf update" to ensure it
doesn't get frustrated by being unable to install the mesa package
from appstream.

Signed-off-by: Sergio Lopez <slp@redhat.com>
2025-06-26 12:09:05 +02:00
Michael Engel 2f3af6afff Use property for model store
By accessing the model store via property a None-check can be performed
and creating an instance on-the-fly. In addition, this removes the need
for setting the store from the factory and removes its optional trait.
The unit tests for ollama have been rewritten as well since functions
such as repo_pull or exists have been removed. It only tests the pull
function which mocks away http calls to external services.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-06-26 09:29:03 +02:00
Michael Engel ef3863904f Refactoring model base class for new model store
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-06-26 09:29:03 +02:00
Michael Engel 8482cf3957 Remove model flag for safetensors via mscli
Relates to: github.com/containers/ramalama/pull/1559

Remove Model flag for safetensor files for now in order to
allow multiple safetensor files be downloaded for the
convert command.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-06-26 09:29:03 +02:00
Michael Engel 8f578ebf30 Prune old model store code in hf-style models
In addition to pruning old model store code, the usage of downloading
files using the hfcli or modelscope cli has been removed.
In the future, the download of multiple files - incl. safetensors - will
be done explicitly based on the metadata only by http requests.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-06-26 09:29:03 +02:00
Michael Engel 512ccbaba5 Prune old model store code in Ollama model
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-06-26 09:29:03 +02:00
Michael Engel 38f16c42c4 Prune old model store code in URL model
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-06-26 09:29:03 +02:00
Michael Engel 5f688686d8 Remove script for old to new model store migration
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-06-26 09:29:03 +02:00
Michael Engel 51f766d898 Remove --use-model-store feature flag
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-06-26 09:29:03 +02: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
Mike Bonnet 77d30733be make use of /dev/dri optional when serving llama-stack
Add the --dri option to disable mounting /dev/dri into the container when running "ramalama serve --api llama-stack".
Update bats test to pass "--dri off".

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-06-25 12:06:30 -07:00
Mike Bonnet 681c488e28
Merge pull request #1608 from containers/konflux-rocm-cuda
konflux: use shared pipelines for rocm, rocm-ubi, and cuda
2025-06-25 09:51:21 -07:00
Eric Curtin f4e929896a
Merge pull request #1606 from containers/fix-text-input
Allow std input
2025-06-25 17:07:49 +01:00
Mike Bonnet 7be12487c6 konflux: use shared pipelines for rocm, rocm-ubi, and cuda
Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-06-25 08:46:11 -07:00
Daniel J Walsh 4b71dafa29
Merge pull request #1599 from containers/konflux-centralize-pipelines
konflux: centralize pipeline definitions
2025-06-25 10:37:26 -04:00
Mike Bonnet ed4879d301 konflux: move Pipeline and PipelineRun definitions into subdirs of .tekton
This will simplify management as more components are on-boarded.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-06-25 07:14:03 -07:00
Eric Curtin aab36b04d4 Allow std input
We used to have this feature, got dropped recently accidentally,
can do things like:

`cat text_file_with_prompt.txt | ramalama run smollm:135m`

or

`cat some_doc | ramalama run smollm:135m Explain this document:`

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-25 15:01:48 +01:00
Daniel J Walsh 2526ab6223
Merge pull request #1600 from containers/konflux/mintmaker/main/registry.access.redhat.com-ubi9-ubi-9.x
chore(deps): update registry.access.redhat.com/ubi9/ubi docker tag to v9.6-1750786174
2025-06-25 09:04:29 -04:00
Eric Curtin f70b13c8db
Merge pull request #1602 from rhatdan/timeout
Some of our tests are running for hours, need to be timed out
2025-06-25 13:35:50 +01:00
Eric Curtin 82d04a7469
Merge pull request #1601 from rhatdan/chat
Missing options of api_key and pid2kill are causing crashes
2025-06-25 13:34:03 +01:00
Daniel J Walsh 951246f228
Missing options of api_key and pid2kill are causing crashes
Also add debug information to chat.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-25 06:46:31 -04:00
Daniel J Walsh 2ba6f6f167
Some of our tests are running for hours, need to be timed out
None of our tests should take more then 1 hour, so time them
out and then need to figure out what is causing the issue.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-25 06:34:47 -04:00
red-hat-konflux-kflux-prd-rh03[bot] 18527f87a6
chore(deps): update registry.access.redhat.com/ubi9/ubi docker tag to v9.6-1750786174
Signed-off-by: red-hat-konflux-kflux-prd-rh03 <206760901+red-hat-konflux-kflux-prd-rh03[bot]@users.noreply.github.com>
2025-06-25 00:02:06 +00:00
Mike Bonnet e661d87580 konflux: centralize pipeline definitions
Move the pipeline definitions into their own files and references them from the PipelineRuns
that are created on pull request and push. This allows the pipelines to be used for multiple
components and dramatically reduces code duplication and maintenance burden.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-06-24 17:00:10 -07:00
Daniel J Walsh dc43419f21
Merge pull request #1595 from rhatdan/fedora
Move RamaLama container image to default to fedora:42
2025-06-24 15:56:50 -04:00
Daniel J Walsh 189d722eb7
Move RamaLama container image to default to fedora:42
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-24 14:34:59 -04:00
Eric Curtin 788d5564d5
Merge pull request #1578 from containers/gemini
API key support
2025-06-24 13:07:35 +01:00
Eric Curtin fd71bac96a
Merge pull request #1589 from rhatdan/accel
Don't pull image when doing ramalama --help call
2025-06-24 12:38:54 +01:00
Daniel J Walsh 1b6b415d0c
Don't pull image when doing ramalama --help call
Fixes: https://github.com/containers/ramalama/issues/1587

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-23 19:44:14 -04:00
Daniel J Walsh 1ee66c0964
Merge pull request #1576 from rhatdan/chat
Remove last libexec program
2025-06-23 13:48:45 -04:00
Daniel J Walsh 6d7bd22ee1
Remove last libexec program
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-23 11:47:01 -04:00
Daniel J Walsh eaa0da253d
Hide --max-model-len from option list
This fixes make validate to not complain about --ctx-size option.

No reason to have this available in display, since this is only for
users assuming vllm options.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-23 11:44:17 -04:00
Daniel J Walsh a00188027c
Merge pull request #1586 from rhatdan/VERSION
Bump to v0.9.3
2025-06-23 11:23:09 -04:00
Eric Curtin 1465086ded API key support
If we pass --api-key, we can talk to OpenAI providers.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-23 14:21:20 +01:00
Daniel J Walsh a9abe6909d
Bump to v0.9.3
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-23 07:01:30 -04:00
Daniel J Walsh 4d49658853
Merge pull request #1579 from nathan-weinberg/rlls-0.2.2
chore: bump ramalama-stack to 0.2.2
2025-06-23 06:52:17 -04:00
Daniel J Walsh 693827df74
Merge pull request #1580 from nathan-weinberg/fix-dash
fix: broken link in CI dashboard
2025-06-23 06:50:30 -04:00
Nathan Weinberg 50d1a8ccb7 fix: broken link in CI dashboard
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-06-22 21:54:40 -04:00
Nathan Weinberg bfa4d32af6 chore: bump ramalama-stack to 0.2.2
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-06-22 21:45:15 -04:00
Daniel J Walsh fe095f1f8d
Merge pull request #1574 from containers/specify-model
Make model argument mandatory
2025-06-21 06:25:58 -04:00
Eric Curtin cb8ab961b5 Make model argument mandatory
To be consistent with "ramalama run" experience. Inferencing
servers that have implemented model-swapping require this. In the
case of servers like llama-server that only load one server, any
value is sufficient.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-21 09:39:38 +01:00
Eric Curtin aa29aa6efa
Merge pull request #1571 from kush-gupt/main
fix: vLLM serving and model mounting
2025-06-20 15:49:44 +01:00
Kush Gupta c4ec0a57e0 fix doc validation
Signed-off-by: Kush Gupta <kushalgupta@gmail.com>
2025-06-20 10:11:51 -04:00
Kush Gupta e698424f78 fix doc typo and codespell test
Signed-off-by: Kush Gupta <kushalgupta@gmail.com>
2025-06-20 08:59:46 -04:00
Kush Gupta d0ecd5b65a alias max model len, improve file mounting logic
Signed-off-by: Kush Gupta <kushalgupta@gmail.com>
2025-06-20 08:26:50 -04:00
Daniel J Walsh 3f87444b6f
Merge pull request #1101 from lsm5/tmt-gpu
TMT: run tests with GPUs
2025-06-20 06:40:38 -04:00
Daniel J Walsh cdc1edc13c
Merge pull request #1566 from containers/containers-install-from-checkout
install ramalama into containers from the current checkout
2025-06-20 06:34:59 -04:00
Daniel J Walsh f795b41ed5
Merge pull request #1567 from sarroutbi/202506182026-fix-accel-image-test
Fix test_accel unit test to fallback to latest
2025-06-20 06:34:29 -04:00
Sergio Arroutbi 307fd722e6
Fix test_accel unit test to fallback to latest
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
2025-06-20 10:29:24 +02:00
Kush Gupta 55b7d568a9
Merge branch 'containers:main' into main 2025-06-19 22:04:53 -04:00
Kush Gupta 847ec6c33f
vllm mount fixes for safetensor directories (#12)
* vllm mount fixes for safetensor directories

Signed-off-by: Kush Gupta <kushalgupta@gmail.com>

* Update ramalama/model.py for better file detection

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* make format

Signed-off-by: Kush Gupta <kushalgupta@gmail.com>

* improve mount for files

Signed-off-by: Kush Gupta <kushalgupta@gmail.com>

* fix docs for new vllm param

Signed-off-by: Kush Gupta <kushalgupta@gmail.com>

* add error handling

Signed-off-by: Kush Gupta <kushalgupta@gmail.com>

* fix cli param default implementation

Signed-off-by: Kush Gupta <kushalgupta@gmail.com>

* adjust error message string

Signed-off-by: Kush Gupta <kushalgupta@gmail.com>

* skip broken test

Signed-off-by: Kush Gupta <kushalgupta@gmail.com>

---------

Signed-off-by: Kush Gupta <kushalgupta@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-06-19 22:04:36 -04:00
Eric Curtin 5ad0f802ba
Merge pull request #1541 from containers/save-space2
Trying to save space
2025-06-20 00:18:05 +01:00
Eric Curtin 6d52980aeb
Merge pull request #1569 from mtrmac/oci-docs
Document the image format created/consumed by the oci:// transport
2025-06-19 21:46:18 +01:00
Miloslav Trmač c63ddbcc64 Document the image format created/consumed by the oci:// transport
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-06-19 21:53:57 +02:00
Lokesh Mandvekar a53c42723a
TMT: run tests with GPUs
This commit adds TMT test jobs triggered via Packit that fetches an
instance with NVIDIA GPU, specified in `plans/no-rpm.fmf`, and can be
verified in the gpu_info test result.

In addition, system tests (nocontainer), validate, and unit tests are
also triggered via TMT.

Fixes: #1054

TODO:
1. Enable bats-docker tests
2. Resolve f41 validate test failures

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-06-19 15:32:31 -04:00
Eric Curtin 5f75e6f6f4 Trying to save space
tiny is is not so tiny, it's 600M

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-19 17:37:44 +01:00
Mike Bonnet ae114e45af install ramalama into containers from the current checkout
Copy the current checkout of the ramalama repo into the containers and use that for installation.
This removes the need for an extra checkout of the ramalama repo, and is consistent with the build
process used by container_build.sh (which used a bind-mount rather than a copy).

This keeps the version of ramalama in sync with the Containerfiles, and makes testing and CI more
useful.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-06-19 08:37:53 -07:00
Lokesh Mandvekar 66f7c0d110
System tests: account for rootful default store
For the rootful case, the default store is at /var/lib/ramalama.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-06-19 10:17:49 -04:00
Daniel J Walsh 1af46a247b
Merge pull request #1550 from rhatdan/chat
Replace ramalama-client-code with ramalama chat
2025-06-19 07:59:42 -04:00
Daniel J Walsh 95a5a14ebf
Replace ramalama-client-code with ramalama chat
ramalama chat does not use --context or --temp, these are server
settings not client side.

Also remove ramalama client command, since this is a duplicate of
ramalama chat.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-19 07:34:36 -04:00
Daniel J Walsh 6c77edfdee
Merge pull request #1534 from containers/latest-only-makes-sense-ollama
:latest tag should not be assumed for non-OCI artefacts
2025-06-18 14:43:40 -04:00
Daniel J Walsh 4e4f5f329c
Merge pull request #1564 from sarroutbi/202506181805-reuse-common-command-execution
Reuse code for unit test execution rules
2025-06-18 14:42:18 -04:00
Sergio Arroutbi 628b723dae
Fix test_accel unit test to fallback to latest
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
2025-06-18 20:26:46 +02: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
Eric Curtin 8ff0cd3287 :latest tag should not be assumed for non-OCI artefacts
I see people showing things like:

file://srv/llm/modles/unsloth/Qwen3-235B-A22B-GGUF/UD_Q2_K_XL/Qwen3-235B-A22B-UD-Q2_K_XL-00001-of-00002.gguf:latest 1 month ago  46.42 GB
file://srv/llm/modles/unsloth/Qwen3-235B-A22B-GGUF/UD_Q2_K_XL/Qwen3-235B-A22B-UD-Q2_K_XL-00002-of-00002.gguf:latest 1 month ago  35.55 GB
file://srv/llm/modles/unsloth/Qwen3-235B-A22B-GGUF/Q8_0/Qwen3-235B-A22B-Q8_0-00001-of-00006.gguf:latest             1 week ago   46.44 GB
file://srv/llm/modles/unsloth/Qwen3-235B-A22B-GGUF/Q8_0/Qwen3-235B-A22B-Q8_0-00002-of-00006.gguf:latest             1 week ago   46.0 GB
file://srv/llm/modles/unsloth/Qwen3-235B-A22B-GGUF/Q8_0/Qwen3-235B-A22B-Q8_0-00003-of-00006.gguf:latest             1 week ago   45.93 GB
file://srv/llm/modles/unsloth/Qwen3-235B-A22B-GGUF/Q8_0/Qwen3-235B-A22B-Q8_0-00004-of-00006.gguf:latest             1 week ago   46.0 GB
file://srv/llm/modles/unsloth/Qwen3-235B-A22B-GGUF/Q8_0/Qwen3-235B-A22B-Q8_0-00005-of-00006.gguf:latest             1 week ago   46.0 GB
file://srv/llm/modles/unsloth/Qwen3-235B-A22B-GGUF/Q8_0/Qwen3-235B-A22B-Q8_0-00006-of-00006.gguf:latest             1 week ago   2.39 GB

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-18 16:53:05 +01:00
Eric Curtin 9df9532ed4
Merge pull request #1562 from sarroutbi/202506181742-add-verbose-rule-for-unit-test-execution
Add verbose rule for complete output on unit tests
2025-06-18 16:47:14 +01: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
Aaron Teo 91dd2df8e5
Merge pull request #1559 from engelmi/do-not-flag-safetensors-as-model
Remove Model flag for safetensor files for now
2025-06-18 22:10:42 +08:00
Eric Curtin f780e41313
Merge pull request #1558 from scraly/patch-1
Add install command via homebrew
2025-06-18 14:47:13 +01:00
Michael Engel ac2ae1e8e9
Remove model flag for safetensor files via hf cli
Fixes: https://github.com/containers/ramalama/issues/1557

Remove Model flag for safetensor files for now in order to
allow multiple safetensor files be downloaded for the
convert command.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-06-18 15:26:33 +02:00
Aurelie Vache 9517fbb90a feat: add install command via homebrew
Signed-off-by: scraly <scraly@gmail.com>
2025-06-18 15:05:35 +02:00
Eric Curtin 67eb9420e1
Merge pull request #1556 from rhatdan/engine
Fix default prefix for systems with no engines
2025-06-18 10:19:24 +01:00
Daniel J Walsh c946769700
Merge pull request #1555 from containers/konflux/mintmaker/main/registry.access.redhat.com-ubi9-ubi-9.x
chore(deps): update registry.access.redhat.com/ubi9/ubi docker tag to v9.6-1749542372
2025-06-18 05:09:31 -04:00
Daniel J Walsh 1a5fd28a4d
Fix default prefix for systems with no engines
Fixes: https://github.com/containers/ramalama/issues/1552

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-18 05:00:21 -04:00
red-hat-konflux-kflux-prd-rh03[bot] f2ef4d4f6a
chore(deps): update registry.access.redhat.com/ubi9/ubi docker tag to v9.6-1749542372
Signed-off-by: red-hat-konflux-kflux-prd-rh03 <206760901+red-hat-konflux-kflux-prd-rh03[bot]@users.noreply.github.com>
2025-06-18 00:03:23 +00:00
Eric Curtin 13b29fab14
Merge pull request #1542 from containers/konflux-ramalama
Red Hat Konflux kflux-prd-rh03 update ramalama
2025-06-17 22:23:29 +01:00
Mike Bonnet df5a093531 konflux: reference the UBI image by digest
This will allow MintMaker to submit PRs to update the UBI reference when new versions
are released.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-06-17 14:09:54 -07:00
Mike Bonnet 6bf454d8ed konflux: add builds for arm64
Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-06-17 14:09:50 -07:00
Mike Bonnet 2a9704fb1b konflux: set path-context to the container-images directory
Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-06-17 14:09:41 -07:00
red-hat-konflux-kflux-prd-rh03 3dbad48272 Red Hat Konflux kflux-prd-rh03 update ramalama
Signed-off-by: red-hat-konflux-kflux-prd-rh03 <konflux@no-reply.konflux-ci.dev>
2025-06-17 14:09:41 -07:00
Daniel J Walsh eb45f50bda
Merge pull request #1551 from rhatdan/test
Create tempdir when run as non-root user
2025-06-17 17:02:46 -04:00
Daniel J Walsh bbf24ae0e9
Create tempdir when run as non-root user
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-17 12:01:08 -04:00
Eric Curtin 13d133490e
Merge pull request #1547 from containers/add_GGML_VK_VISIBLE_DEVICES
Add GGML_VK_VISIBLE_DEVICES env var
2025-06-17 12:07:23 +01:00
Daniel J Walsh aaa6f0f362
Merge pull request #1549 from containers/spaces2tabs
Tabs to spaces
2025-06-17 07:04:29 -04:00
Eric Curtin 5fe848eb93 Add GGML_VK_VISIBLE_DEVICES env var
Can be used to manually select vulkan device

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-17 11:57:16 +01:00
Eric Curtin 10350d61f8 Tabs to spaces
github UI showed red, changing just in case, incorrect tabs or
spaces can cause github ui to skip builds.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-17 11:55:24 +01:00
Eric Curtin 03110ac2e5
Merge pull request #1548 from rhatdan/test
Run bats test with TMPDIR pointing at /mnt/tmp
2025-06-17 11:54:17 +01:00
Daniel J Walsh f8396fc6bf
Run bats test with TMPDIR pointing at /mnt/tmp
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-17 06:47:10 -04:00
Eric Curtin 3f012ba00e
Merge pull request #1502 from alaviss/push-qsrlulqsylxk
model: always pass in GPU offloading parameters
2025-06-17 10:20:02 +01:00
Daniel J Walsh 9e2ef6fced
Merge pull request #1544 from containers/add-dnf-update
Add dnf update -y to Fedora ROCm build
2025-06-17 05:00:07 -04:00
Eric Curtin 65a08929bb Add dnf update -y to Fedora ROCm build
Trying to fix a compiler issue

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-16 21:54:30 +01:00
Daniel J Walsh f0e799319c
Merge pull request #1539 from containers/dedepu
Deduplicate code
2025-06-16 14:30:38 -04:00
Daniel J Walsh 4382641624
Merge pull request #1543 from containers/whisper-downgrade
Downgrade whisper
2025-06-16 14:21:38 -04:00
Eric Curtin e4eca9c059 Downgrade whisper
We don't need the latest released version right now

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-16 19:20:36 +01:00
Daniel J Walsh e0e3ee137c
Merge pull request #1537 from rhatdan/VERSION
Bump to v0.9.2
2025-06-16 13:40:13 -04:00
Eric Curtin d62f9d0284 Deduplicate code
So there is only one version of this function

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-16 18:29:37 +01:00
Eric Curtin 11186fac1d
Merge pull request #1540 from containers/update-podman
Upgrade podman
2025-06-16 19:28:19 +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
Eric Curtin ae54b39c31
Merge pull request #1512 from Hasnep/make-minimum-python-version-consistent
Make minimum version of Python consistent
2025-06-16 18:58:37 +02:00
Eric Curtin 7955e292df
Merge pull request #1538 from containers/tabs2spaces
Convert tabs to spaces
2025-06-16 17:08:31 +02:00
Eric Curtin 3930d68b8a Convert tabs to spaces
Saw this in github ui

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-16 16:06:39 +01:00
Daniel J Walsh 96c28b179a
Bump to v0.9.2
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-16 09:56:40 -04:00
Daniel J Walsh e7ab2cb96b
Merge pull request #1527 from rhatdan/image
honor the user specifying the image
2025-06-16 09:55:44 -04:00
Daniel J Walsh f48293cd85
Merge pull request #1536 from nathan-weinberg/bump-rls
chore: bump ramalama-stack to 0.2.1
2025-06-16 09:52:45 -04:00
Nathan Weinberg 257d8597d8 chore: bump ramalama-stack to 0.2.1
adds RAG capabilities

Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-06-16 09:37:38 -04: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 fad170d198 Make minimum version of Python consistent
Signed-off-by: Hannes <h@nnes.dev>
2025-06-16 21:09:32 +08:00
Daniel J Walsh de9c7ed89e
Merge pull request #1535 from containers/dont-always-set-up-this-symlink
Not sure this is supposed to be here
2025-06-16 08:11:53 -04:00
Eric Curtin ce11e66dd4 Not sure this is supposed to be here
Think it's only meant for the:

container-images/scripts/build-cli.sh

version, it's breaking podman on my bootc system and replacing
/usr/bin/podman with a broken /usr/bin/podman-remote symlink.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-16 12:55:57 +01:00
Eric Curtin acc426bbe1
Merge pull request #1532 from rhatdan/huggingface
Suggest using uv pip install to get missing module
2025-06-16 11:21:11 +02:00
Daniel J Walsh e455d82def
Suggest using uv pip install to get missing module
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-16 04:06:23 -04:00
Eric Curtin 2fe2e517be
Merge pull request #1531 from rhatdan/chat
Add ramalama chat command
2025-06-15 22:47:47 +02:00
Daniel J Walsh 3cd6a59a76
Apply suggestions from code review
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-15 22:16:18 +02:00
Daniel J Walsh a21fa39b45
Add ramalama chat command
For now we will just add the chat command, next PR will remove the
external chat command and just use this internal one.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-15 21:56:36 +02:00
Daniel J Walsh 093d5a4cf1
Merge pull request #1488 from ieaves/imp/typed-config
Refactor config and arg typing
2025-06-15 03:29:01 -04:00
Daniel J Walsh c637a404f8
Merge pull request #1523 from containers/change-from
Change the FROM for asahi container image
2025-06-15 02:30:10 -04:00
Daniel J Walsh 913c0c2cdf
Merge pull request #1529 from containers/add-colors
Add colors to "ramalama serve" if we can
2025-06-15 02:24:32 -04:00
Eric Curtin ee4ccffb29 Add colors to "ramalama serve" if we can
I don't notice any difference but a lot of things are LOG_INFO in
llama.cpp

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-15 00:57:41 +01:00
Eric Curtin 7a2c30415a
Merge pull request #1528 from engelmi/add-all-option-to-ls
Add --all option to ramalama ls
2025-06-14 18:33:31 +02:00
Michael Engel 68052a156b
Remove unneeded list and type cast
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-06-14 18:11:04 +02:00
Michael Engel 28b4d8a9c0
Add --all option to ramalama ls
Relates to: https://github.com/containers/ramalama/issues/1278

By default, ramalama ls should not display partially downloaded
AI Models. In order to enable users to view all models, the new
option --all for the ls command has been introduced.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-06-14 17:41:11 +02:00
Ian Eaves cb6226534d sourcery changes
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-06-13 14:56:09 -05:00
Ian Eaves f6b33ebafd sourcery sucks
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-06-13 14:22:43 -05:00
Ian Eaves 796d7b5782 sourcery changes
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-06-13 12:39:27 -05:00
Ian Eaves 91a12887a5 modified ollama-model_pull test
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-06-13 11:02:47 -05:00
Ian Eaves eff6eab2ba sourcery nits
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-06-13 10:44:31 -05:00
Eric Curtin 90f7fe6e79 Change the FROM for asahi container image
Explicitly add quay.io

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-13 13:57:58 +01:00
Eric Curtin 6556b04df9
Merge pull request #1522 from rhatdan/demo
Update to add multi-modal
2025-06-13 14:38:33 +02:00
Daniel J Walsh 9f1faba404
Update to add multi-modal
Remove failing on pipe errors, since something the network
can fail and break the demo,  it would be better to continue
after failures.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-13 14:16:23 +02:00
Daniel J Walsh 2f92ec55c7
Merge pull request #1506 from rhatdan/tty
Do not run with --tty when not in interactive mode
2025-06-13 08:13:23 -04:00
Daniel J Walsh 9cc4b7f266
Merge pull request #1517 from kwaa/chore/intel_gpus
chore(common/intel_gpus): detect arc a770, a750
2025-06-13 04:26:43 -04:00
藍+85CD 9172e3fb15
chore(common/intel_gpus): detect arc a770, a750
Signed-off-by: 藍+85CD <50108258+kwaa@users.noreply.github.com>
2025-06-13 15:31:04 +08:00
Daniel J Walsh b7555c0e81
Do not run with --tty when not in interactive mode
I have found that when running with nvidia the -t (--tty) option
in podman is covering up certain errors.  When we are not running
ramalama interactively, we do not need this flag set, and this
would make it easier to diagnose what is going on with users
systems.

Don't add -i unless necessary

Server should not need to be run with --interactive or --tty.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-13 09:23:14 +02:00
Daniel J Walsh 7550fd37c8
Merge pull request #1505 from containers/renovate/huggingface-hub-0.x
fix(deps): update dependency huggingface-hub to ~=0.33.0
2025-06-13 02:37:15 -04:00
Daniel J Walsh d583955bdd
Merge pull request #1497 from containers/change-install-script
This installs ramalama via uv if python3 version is too old
2025-06-13 02:35:58 -04:00
Daniel J Walsh 87e6d5ece7
Merge pull request #1510 from containers/increase-retry-attempt-v2
Wait for upto 16 seconds for model to load
2025-06-13 02:35:22 -04:00
Daniel J Walsh 83363e7814
Merge pull request #1513 from Hasnep/update-black-target-version
Update black target version
2025-06-13 02:33:11 -04:00
Daniel J Walsh 7c730e03bf
Merge pull request #1516 from containers/cosmetic
For `ramalama ls` shorten huggingface lines
2025-06-13 02:26:37 -04:00
Hannes 1b2867e995 Update black target version to 3.11, 3.12 and 3.13
Signed-off-by: Hannes <h@nnes.dev>
2025-06-13 08:04:12 +08:00
Ian Eaves e87740c06d sourcery nits
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-06-12 18:04:58 -05:00
Ian Eaves 40705263e1 merge 2025-06-12 17:27:21 -05:00
Ian Eaves 0be170bb56 fixing typo
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-06-12 17:23:43 -05:00
Ian Eaves 82d24551ca refactored layered config to preserve previous functionality
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-06-12 17:19:35 -05:00
Ian Eaves 5b138bdba5 ollama tests, type fixes, format tests
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-06-12 17:19:35 -05:00
Ian Eaves 6f49a310be unnecessary dep group
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-06-12 17:19:35 -05:00
Ian Eaves 0f39374f2b type and bug fixes
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-06-12 17:19:35 -05:00
Ian Eaves 2de9b928d4 sourcery found a few things
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-06-12 17:19:35 -05:00
Ian Eaves 47b8b6055c config rewrite + tests
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-06-12 17:19:35 -05:00
Eric Curtin e9fac56ad5
Merge pull request #1514 from Hasnep/add-python-shebang-files-to-linting
Add Python shebang files to linting
2025-06-12 08:49:47 -05:00
Eric Curtin 6196c88713 For `ramalama ls` shorten huggingface lines
Substitute huggingface with hf and remove :latest as it doesn't
really apply. huggingface lines are particularly lengthy so it's
welcome characters saved. hf is a common acronym for huggingface

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-12 14:26:53 +01:00
Eric Curtin 12b37d60cd
Merge pull request #1511 from engelmi/ignore-rm-of-non-existing-snapshot-dir
Ignore errors when removing snapshot directory
2025-06-12 07:42:08 -05: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
Hannes 4712924e78 Fix unformatted Python files
Signed-off-by: Hannes <h@nnes.dev>
2025-06-12 20:03:14 +08: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
Michael Engel 830409e618
Ignore errors when removing snapshot directory on failed creation
Relates to: https://github.com/containers/ramalama/issues/1508

remove_snapshot should never fail, therefore adding the ignore_errors=True.
Before removing a snapshot with ramalama rm an existence check is made. If
the model does not exist, an error will be raised to preserve the previous
behavior of that command.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-06-12 13:31:21 +02:00
Eric Curtin 493d34bd29 Wait for upto 16 seconds for model to load
Trying to put this timeout to bed once and for all. There is a
chance a really large model on certain hardware could take more
than 16 seconds to load.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-12 09:58:42 +01:00
Daniel J Walsh e5635d1d14
Merge pull request #1507 from containers/increase-retry-attempt
Increase retry attempts to attempt to connect to server
2025-06-12 03:58:14 -04:00
Eric Curtin 22986e0d6a Increase retry attempts to attempt to connect to server
increase i to 512

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-12 05:15:41 +01:00
renovate[bot] 75436923b1
fix(deps): update dependency huggingface-hub to ~=0.33.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-11 20:26:34 +00:00
Daniel J Walsh 003612abf7
Merge pull request #1503 from nathan-weinberg/fix-container-dep
fix: remove unneeded dependency from Llama Stack container
2025-06-11 00:11:17 -04:00
Daniel J Walsh d98adcbc9f
Merge pull request #1499 from containers/update-shortnames
This is not a multi-model model
2025-06-10 23:43:49 -04:00
Nathan Weinberg ea9ba184ac fix: remove unneeded dependency from Llama Stack container
`blobfile` dependency is already included in ramalama-stack version 0.2.0
adding it explicitly is unnecessarily

Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-06-10 22:20:38 -04:00
Leorize 6bac6d497a
readme: apply styling suggestions
Signed-off-by: Leorize <leorize+oss@disroot.org>
2025-06-10 17:53:49 -05:00
Leorize 5a3e55eb0c
model: always pass in GPU offloading parameters
This does nothing on systems with no GPUs, but on Vulkan-capable
systems, this would automatically offload the model to capable
accelerators.

Take this moment to claim Vulkan support in README also.

Signed-off-by: Leorize <leorize+oss@disroot.org>
2025-06-10 17:46:14 -05:00
Eric Curtin 6959d73d30
Merge pull request #1501 from alaviss/push-tumrzqxpzvkn
amdkfd: add constants for heap types
2025-06-10 17:41:49 -05:00
Leorize 309766dd8c
amdkfd: add constants for heap types
Signed-off-by: Leorize <leorize+oss@disroot.org>
2025-06-10 17:22:30 -05:00
Eric Curtin 4808a49de0
Merge pull request #1500 from alaviss/push-pwxuznmnqptr
Only enumerate ROCm-capable AMD GPUs
2025-06-10 17:02:17 -05:00
Leorize db4a7d24af
Apply formatting fixes
Signed-off-by: Leorize <leorize+oss@disroot.org>
2025-06-10 15:20:18 -05:00
Leorize 93e36ac24e
Extract VRAM minimum into a constant
Signed-off-by: Leorize <leorize+oss@disroot.org>
2025-06-10 15:17:37 -05:00
Leorize ecb9fb086f
Extract amdkfd utilities to its own module
Signed-off-by: Leorize <leorize+oss@disroot.org>
2025-06-10 15:17:20 -05:00
Leorize fab87654cb
Only enumerate ROCm-capable AMD GPUs
Discover AMD graphics devices using AMDKFD topology instead of
enumerating the PCIe bus. This interface exposes a lot more information
about potential devices, allowing RamaLama to filter out unsupported
devices.

Currently, devices older than GFX9 are filtered, as they are no longer
supported by ROCm.

Signed-off-by: Leorize <leorize+oss@disroot.org>
2025-06-10 14:54:48 -05:00
Eric Curtin 9bc76c2757 This is not a multi-model model
Although the other gemma once are. Point the user towards a single
gguf.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-10 18:43:06 +01:00
Daniel J Walsh 83a75f16f7
Merge pull request #1492 from containers/renovate/registry.access.redhat.com-ubi9-ubi-9.x
chore(deps): update registry.access.redhat.com/ubi9/ubi docker tag to v9.6-1749542372
2025-06-10 08:42:14 -04:00
Daniel J Walsh 8a9f6a0291
Merge pull request #1496 from containers/fix-build
Install uv to fix build issue
2025-06-10 08:32:17 -04: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
Daniel J Walsh 4be8cbc71e
Merge pull request #1495 from containers/dont-use-llvmpipe
There's a change that we want that avoids using software rasterizers
2025-06-10 08:08:50 -04:00
Eric Curtin b4a3375d94 There's a change that we want that avoids using software rasterizers
It avoids using llvmpipe when Vulkan is built in and fallsback to
ggml-cpu.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-10 13:05:31 +01:00
Daniel J Walsh 7bdd073b59
Merge pull request #1491 from makllama/xd/fix_hf
Fix #1489
2025-06-10 05:25:40 -04:00
renovate[bot] 5b849722cb
chore(deps): update registry.access.redhat.com/ubi9/ubi docker tag to v9.6-1749542372
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-10 09:22:45 +00:00
Daniel J Walsh 5925bb6908
Merge pull request #1490 from rhatdan/llama-stack
Make sure llama-stack URL is shown to user
2025-06-10 05:22:05 -04:00
Xiaodong Ye ae0775afd1 Address review comments
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-06-10 16:45:47 +08:00
Xiaodong Ye 6f020d361c Fix #1489
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-06-10 16:39:26 +08:00
Daniel J Walsh 764fc2d829
Make sure llama-stack URL is shown to user
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-10 09:50:04 +02:00
Daniel J Walsh b64d82276c
Merge pull request #1471 from rhatdan/oci
Throw exception when using OCI without engine
2025-06-10 03:36:20 -04:00
Daniel J Walsh 041c05d2b8
Throw exception when using OCI without engine
Fixes: https://github.com/containers/ramalama/issues/1463

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-10 08:46:01 +02:00
Daniel J Walsh 97a14e9c2d
Merge pull request #1486 from containers/remove-duplicate-line-on-restapi
Only print this in the llama-stack case
2025-06-10 00:09:54 -04:00
Eric Curtin 2368da00ac Only print this in the llama-stack case
In the llama.cpp case it doesn't make as much sense, llama-server
prints this string when it's ready to be served like so:

main: server is listening on http://0.0.0.0:8080 - starting the main loop

This can be printed seconds or minutes too early potentially in
the llama.cpp case.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-09 15:25:08 +01:00
Daniel J Walsh c62acfbba6
Merge pull request #1484 from rhatdan/VERSION
Bump to v0.9.1
2025-06-09 08:37:35 -04:00
Daniel J Walsh 9c639fc651
Bump to v0.9.1
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-09 14:37:05 +02:00
Daniel J Walsh bbcfb7c0f1
Fix llama-stack
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-09 14:37:05 +02:00
Daniel J Walsh 3317372625
Merge pull request #1474 from rhatdan/demos
Update demos to show serving models.
2025-06-09 03:35:06 -04:00
Daniel J Walsh cd2a8c3539
Update demo scripts to show serve
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-09 09:34:36 +02:00
Daniel J Walsh fe6d90461f
Merge pull request #1472 from rhatdan/llama-stack
Fix handling of generate with llama-stack
2025-06-09 03:29:53 -04:00
Daniel J Walsh e4ea40a1b8
Merge pull request #1483 from containers/renovate/huggingface-hub-0.x
fix(deps): update dependency huggingface-hub to ~=0.32.4
2025-06-09 00:14:15 -04:00
renovate[bot] 9627b5617b
fix(deps): update dependency huggingface-hub to ~=0.32.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-08 20:35:25 +00:00
Eric Curtin 4a10c02716
Merge pull request #1481 from ieaves/imp/dev-dependency-groups
Adds dev dependency groups
2025-06-08 15:34:54 -05:00
Daniel J Walsh 4fe7ae73a1
Fix stopping of llama-stack based containers by name
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-08 11:54:24 +02:00
Daniel J Walsh 2ca6b57dc3
Fix handling of generate with llama-stack
llama-stack API is not working without --generate command.

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-07 10:36:46 +02: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
Nathan Weinberg 268e47ccc0
Merge pull request #1478 from nathan-weinberg/stack-bump
chore: bump 'ramalama-stack' version to 0.2.0
2025-06-05 16:15:03 -04:00
Nathan Weinberg c59a507426 chore: bump 'ramalama-stack' version to 0.2.0
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-06-05 15:00:11 -04:00
Daniel J Walsh fc9b33e436
Merge pull request #1477 from containers/no-warmup
Don't warmup by default
2025-06-05 14:46:30 -04:00
Eric Curtin 8d2041a0bb Don't warmup by default
llama-server by default warms up the model with an empty run for
performance reasons. We can warm up ourselves with a real query.
Warming up was causing issues and delays start time.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-05 19:42:41 +01:00
Daniel J Walsh a67d8c1f6a
Merge pull request #1476 from containers/env-var
Call set_gpu_type_env_vars rather than set_accel_env_vars
2025-06-05 14:05:08 -04:00
Eric Curtin 882011029c Call set_gpu_type_env_vars rather than set_accel_env_vars
For GPU detection.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-05 16:43:48 +01:00
Daniel J Walsh f07a062124
Merge pull request #1475 from containers/env-var
Do not override a small subset of env vars
2025-06-05 11:00:31 -04:00
Eric Curtin ff446f96fb Do not override a small subset of env vars
RamaLama does not try to detect GPU if the user has already set
certain env vars. Make this list smaller.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-05 14:01:45 +01:00
Daniel J Walsh ef7bd2a004
Merge pull request #1467 from rhatdan/llama-stack
llama-stack container build fails with == 1.5.0
2025-06-05 01:39:04 -04:00
Daniel J Walsh b990ef0392
Merge pull request #1469 from containers/timeout-change
Change timeouts
2025-06-04 20:13:44 -04:00
Eric Curtin 0bcf3b8308
Merge pull request #1468 from waltdisgrace/documentation_improvements
Documentation improvements
2025-06-04 11:38:55 -05:00
Eric Curtin 0455e45073 Change timeouts
Most we want to sleep between request attempts in 100ms, a request
every 100ms isn't that expensive.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-06-04 17:37:11 +01:00
Grace Chin c4777a9ccc Add documentation about running tests
Signed-off-by: Grace Chin <gchin@redhat.com>
2025-06-04 11:55:57 -04:00
Daniel J Walsh 56b62ec756
Merge pull request #1466 from makllama/xd/rename
Rename: RepoFile=>HFStyleRepoFile, BaseRepository=>HFStyleRepository, BaseRepoModel=>HFStyleRepoModel
2025-06-04 05:28:53 -04:00
Daniel J Walsh 8538e01667
llama-stack container build fails with == 1.5.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-04 10:58:41 +02:00
Xiaodong Ye 86fbd93e5f Rename: RepoFile=>HFStyleRepoFile, BaseRepository=>HFStyleRepository, BaseRepoModel=>HFStyleRepoModel
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-06-04 09:01:20 +08:00
Daniel J Walsh 31b82b36de
Merge pull request #1465 from nathan-weinberg/stack-lock
fix: lock down ramalama-stack version in llama-stack Containerfile
2025-06-03 15:21:00 -04:00
Nathan Weinberg ae17010390 fix: lock down ramalama-stack version in llama-stack Containerfile
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-06-03 14:16:50 -04:00
Eric Curtin 8056437669
Merge pull request #1464 from taronaeo/chore/rm-else-in-llama-whisper-build
chore: remove unclear else from llama and whisper build
2025-06-03 12:19:31 -05:00
Aaron Teo bbd6afc8e9
chore: remove unclear else from llama and whisper build
Ref: https://github.com/containers/ramalama/pull/1459#discussion_r2124350835

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
2025-06-04 00:43:05 +08:00
Eric Curtin cc73b6bd1e
Merge pull request #1461 from taronaeo/doc/container-build-help
docs: update container_build.sh help information
2025-06-03 11:15:10 -05:00
Eric Curtin cc2970f027
Merge pull request #1459 from taronaeo/feat/s390x-build
feat: s390x build commands
2025-06-03 11:13:17 -05:00
Aaron Teo bf0bfe0761
docs: update container_build.sh help information
Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

fix: remove -v from print information

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
2025-06-03 23:49:37 +08:00
Aaron Teo 3996f1b4a4
feat: s390x build commands
currently it builds correctly on s390x but we want to enforce the
-DGGML_VXE=ON flag. we also want to disable whisper.cpp for now until we
can bring up support for it, otherwise it will be a product that none of us
have experience in.

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

fix: missing s390x for ramalama

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

feat: disable whisper.cpp for s390x

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

chore: remove s390x containerfile

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
2025-06-03 23:38:33 +08:00
Daniel J Walsh e053285a7c
Merge pull request #1462 from rhatdan/VERSION
Bump to v0.9.0
2025-06-03 07:28:33 -04:00
Daniel J Walsh 50df70c48c
Bump to v0.9.0
Switching pyproject.toml to python 3.10 since
CANN and MUSE containerfiles only have access to those
versions of python.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-03 06:53:08 -04:00
Daniel J Walsh 6d7cfa88a4
Merge pull request #1457 from rhatdan/llama-stack
Add support for generating kube.yaml and quadlet/kube files for llama…
2025-06-03 06:51:51 -04:00
Eric Curtin 75b36dc3ba
Merge pull request #1458 from engelmi/snapshot-verification
Snapshot verification
2025-06-02 07:47:30 -05:00
Michael Engel b84527bdd5
Replace exception with explicit is_gguf check
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-06-02 13:11:01 +02:00
Michael Engel 4f53c65386
Improved error handling when creating new snapshot
An error when creating new snapshots has only been partially handled
inside the model store and the caller side had to clean up properly.
In order to simplify this, more error handling has been added when
creating new snapshots - removing the (faulty) snapshot, logging and
passing the exception upwards so that the caller can do additional
actions. This ensures that the state remains consistent.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-06-02 13:11:01 +02:00
Michael Engel 228c985d2c
Moved endianness verification to dedicated step
Previously, the endianness check was done for each SnapshotFile and
these files might not be models, but could also be miscellaneous such
as chat templates or other meta data. By removing only the affected file
on a mismatch error the store might get into an inconsistent state since
the cleanup depends on the error handling of the caller.
Therefore, the check for endianness has been moved one layer up and only
checks the flagged model file. In case of a mismatch an implicit removal
of the whole snapshot is triggered.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-06-02 13:11:01 +02:00
Michael Engel 381d052d55
Extract model endianness into dedicated function
By moving the recently improved code to detect the endianness into
a dedicated function, its reusability is increased. Also, a specific
exception class if the model is not in the gguf format has been added.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-06-02 13:11:01 +02:00
Michael Engel b6d1eb77a1
Remove unused GGUFEndian members
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-06-02 13:11:01 +02:00
Daniel J Walsh b218c099e4
Add support for generating kube.yaml and quadlet/kube files for llama-stack
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-06-02 06:03:26 -04:00
Daniel J Walsh c15a1e31f4
Merge pull request #1451 from rhatdan/selinux
Eliminate selinux-policy packages from containers
2025-06-01 06:20:27 -04:00
Eric Curtin a1cbd017e9
Merge pull request #1456 from makllama/xd/refactoring
Refactoring huggingface.py and modelscope.py and extract repo_model_base.py
2025-05-31 11:39:20 -05:00
Eric Curtin ee7cb50849
Merge pull request #1413 from rhatdan/llama-stack
Add support for llama-stack
2025-05-31 11:37:48 -05:00
Xiaodong Ye 816593caf6 Refactoring huggingface.py and modelscope.py and extract repo_model_base.py
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-05-31 21:04:16 +08:00
Daniel J Walsh 360f075fed
Eliminate selinux-policy packages from containers
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-05-31 05:28:57 -04:00
Eric Curtin 408ee66000
Merge pull request #1454 from taronaeo/feat/hf-byteswap-on-save
feat(model_store): prevent model endianness mismatch on download
2025-05-30 15:08:22 -05:00
Aaron Teo a8dec56641
feat(model_store): prevent model endianness mismatch on download
Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

fix(gguf_parser): missed some calls

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

fix(gguf_parser): typo `return` vs `raise`

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

fix(gguf_parser): missing staticmethod declarations

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

feat(model_store): prevent model endianness mismatch on download

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

feat(model_store): prevent downloading of non-native endian models

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

feat(model_store): check file for gguf and verify endianness

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

feat(model_store): add more information on why we deny endian mismatch

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

fix(model_store): linters complaining

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

fix(model_store): linter complaining

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

fix(model_store): linter complaining

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
2025-05-31 03:04:27 +08:00
Daniel J Walsh a437651934
Add support for llama-stack
Add new option --api which allows users to specify the API Server
either llama-stack or none.  With None, we just generate a service with
serve command. With `--api llama-stack`, RamaLama will generate an API
Server listening on port 8321 and a openai server listening on port
8080.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-05-30 09:16:52 -04:00
Daniel J Walsh 52204997b2
Merge pull request #1455 from almusil/logging
Small logging improvements
2025-05-30 08:01:24 -04:00
Daniel J Walsh 27ec0d05ef
Merge pull request #1452 from taronaeo/fix/gguf-parser-string-endian
fix(gguf_parser): fix memoryerror exception when loading non-native models
2025-05-30 05:50:56 -04:00
Ales Musil 7d62050941 Add more logging around HTTP requests.
Add more logging to indacate requests to http/https addresses in
debug. This should make it easier to find out what exactly is going
on under the hood mainly for pull command.

Signed-off-by: Ales Musil <amusil@redhat.com>
2025-05-30 08:57:50 +02:00
Ales Musil 4c905a4207 Add global logger and use it in the existing code.
Add global logger that can be used to print message to stderr.
Replace all perror calls in dabug cases with logger.debug calls
which reduces the extra argument required to pass as the module
will print error message based on the level.

Signed-off-by: Ales Musil <amusil@redhat.com>
2025-05-30 08:57:50 +02:00
Eric Curtin fbca7ec238
Merge pull request #1450 from rhatdan/libexec
make ramalama-client-core send default model to server
2025-05-30 00:14:46 -05:00
Aaron Teo 1b32a09190
fix(gguf_parser): fix memoryerror exception when loading non-native
Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

fix(gguf_parser): missed some calls

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

fix(gguf_parser): typo `return` vs `raise`

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

fix(gguf_parser): missing staticmethod declarations

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
2025-05-30 10:05:05 +08:00
Eric Curtin d1bfe4a18a
Merge pull request #1449 from rhatdan/vulkan1
Switch default ramalama image build to use VULKAN
2025-05-29 19:41:23 -05:00
Daniel J Walsh b26a82c132
make ramalama-client-core send default model to server
Also move most of the helper functions into ramalamashell class

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-05-29 16:19:38 -04:00
Daniel J Walsh b6d5e95e2c
Switch default ramalama image build to use VULKAN
podman 5.5 and Podman Desktop have been updated, this
should give us better performance then previous versions
on MAC.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-05-29 09:30:23 -04:00
Daniel J Walsh 8a604e3b13
Merge pull request #1430 from melodyliu1986/melodyliu1986-feature-branch
fix(run): Ensure 'run' subcommand works with host proxy settings.
2025-05-29 08:52:48 -04:00
Daniel J Walsh 7c2b21bb25
Merge pull request #1447 from rhatdan/choice
Choice could be not set and should not be used
2025-05-29 08:42:21 -04:00
Daniel J Walsh 398309a354
Choice could be not set and should not be used
Fixes: https://github.com/containers/ramalama/issues/1445

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-05-29 06:54:54 -04:00
Song Liu 206d669ce7 fix(run): Ensure 'run' subcommand works with host proxy settings.
When 'ramalama run' is used with '--network none', it was inheriting host proxy
environment variables. This caused the interanl client to fail when connecting to
the internal llama-server on 127.0.0.1, as it tried to route loopback traffic through
the unreachable proxy.

This change modifies engine.py to:
- Correctly set NO_PROXY/no_proxy for localhost and 127.0.0.1.
- Explicitly unset http_proxy, https_proxy, HTTP_PROXY, and HTTPS_PROXY variables
for the container when the 'run' subcommand is invoked.

This allows the internal client to connect directly to the internal server, resolving
the connection error.

Fixes: #1414

Signed-off-by: Song Liu <soliu@redhat.com>
2025-05-29 15:50:15 +08:00
Daniel J Walsh 859609e59e
Merge pull request #1444 from taronaeo/feat/s390x-build
fix(gguf_parser): fix big endian model parsing
2025-05-28 11:22:57 -04:00
Aaron Teo 0bf4f5daf7
refactor(gguf_parser): fix big endian model parsing
Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

wip(gguf_parser): debug gguf_version

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

wip(gguf_parser): swap endianness for model version

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

wip(gguf_parser): manually set to big endian mode first

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

wip(gguf_parser): refactor endianness read

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

fix(gguf_parser): unable to load big endian models on big-endian

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

wip(gguf_parser): add print statements for debug

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

wip(gguf_parser): pin endianness for now

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

fix(gguf_parser): support big-endian model

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

wip(build_llama_and_whisper): add s390x build flags

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

wip(build_llama_and_whisper): add openblas-openmp dep

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

Revert "wip(build_llama_and_whisper): add openblas-openmp dep"

This reverts commit 375a358d192789cd4651886308cc723e56baf50f.

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

Revert "wip(build_llama_and_whisper): add s390x build flags"

This reverts commit 00fc3ea21b64a9a39226878a0bf194c1b4bc3c41.

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

chore(build_rag): add notification of rag and docling build skip

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

fix(linter): code formatting

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

fix(linter): separately declare variables

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

fix(model_inspect): fix model endianness detection

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

fix(linter): fix code styling

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

fix(model_inspect): circular import for ggufendian

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>

fix(endian): missing import

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
2025-05-28 22:32:09 +08:00
Daniel J Walsh b9171dcf4f
Merge pull request #1442 from olliewalsh/quadlet_duplicate_options
Fix quadlet handling of duplicate options
2025-05-28 08:27:43 -04:00
Oliver Walsh 82c45f2171 Fix quadlet handling of duplicate options
Re-implement without relying on ConfigParser which does not support duplicate
options.
Extend unit test coverage for this and correct the existing test data.

Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2025-05-28 02:16:31 +01:00
Daniel J Walsh e26a141f33
Merge pull request #1441 from nathan-weinberg/py-version
fix: update references to Python 3.8 to Python 3.11
2025-05-27 13:14:09 -04:00
Nathan Weinberg 31b23a2ff7 fix: update references to Python 3.8 to Python 3.11
prev commit made Python 3.11 the min version for
ramalama, but not all references in the project
were updated to reflect this

Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-05-27 11:41:08 -04:00
Daniel J Walsh 69a371c626
Merge pull request #1439 from rhatdan/VERSION
Bump to v0.8.5
2025-05-27 08:53:06 -04:00
Daniel J Walsh b7d45f48aa
Merge pull request #1438 from p5/bump-llama.cpp
chore: bump llama.cpp to support tool streaming
2025-05-27 07:34:03 -04:00
Robert Sturla b3adc7445b
fix(ci): remove aditional unused software during build workflow
Signed-off-by: Robert Sturla <robertsturla@outlook.com>
2025-05-27 10:00:05 +01:00
Robert Sturla d23ed7d7ec
chore: bump llama.cpp to support tool streaming
Signed-off-by: Robert Sturla <robertsturla@outlook.com>
2025-05-26 22:02:20 +01:00
Daniel J Walsh 691c235b80
Bump to v0.8.5
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-05-26 06:26:40 -04:00
Daniel J Walsh 90974a49af
Merge pull request #1436 from makllama/xd/mudnn
Support Moore Threads GPU #3
2025-05-26 05:58:09 -04:00
Xiaodong Ye 57243bcfb0 musa: switch to mudnn images
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-05-26 11:23:53 +08:00
Daniel J Walsh a1e2fad76f
Merge pull request #1435 from containers/multimodal
Don't use jinja in the multimodal case
2025-05-24 05:41:30 -04:00
Eric Curtin 98e15e40db Don't use jinja in the multimodal case
At least with smolvlm the output becomes junk with this option on.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-05-23 18:19:53 +01:00
Eric Curtin e041cc8e44
Merge pull request #1426 from afazekas/split_file
split/big model support for llama.cpp
2025-05-20 08:58:17 -04:00
Daniel J Walsh 64ce8a1018
Merge pull request #1425 from olliewalsh/hftokenauth
Add support for Hugging Face token authentication
2025-05-20 08:47:49 -04:00
Daniel J Walsh e3dc18558a
Merge pull request #1428 from sarroutbi/202505201103-remove-unused-parameters
Remove unused parameters from ollama_repo_utils.py
2025-05-20 07:19:57 -04:00
Eric Curtin 157c598568
Merge pull request #1427 from afazekas/bump-bug-rocm
Bump llama.cpp to fix rocm bug
2025-05-20 06:13:04 -04:00
Sergio Arroutbi 6e0b3f4361
Remove unused parameters from ollama_repo_utils.py
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
2025-05-20 11:03:41 +02:00
Attila Fazekas 14e443dd47 Bump llama.cpp to fix rocm bug
Last bump unfortunately bring a bug to rocm/hip support
bumping the version to include the fix.

[0] https://github.com/ggml-org/llama.cpp/issues/13437

Signed-off-by: Attila Fazekas <afazekas@redhat.com>
2025-05-20 10:29:27 +02:00
Attila Fazekas efa62203eb split/big model support for llama.cpp
Bigger than 70B models typically stored in multiple gguf files
with a special naming what the llama.cpp expects.

Signed-off-by: Attila Fazekas <afazekas@redhat.com>
2025-05-20 10:02:36 +02:00
Oliver Walsh 14a632b081 Only remove a snapshot if we tried to create one
Otherwise can remove an existing snapshot due to an unrelated error
e.g HTTP 401 if token auth fails

Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2025-05-19 11:53:51 +01:00
Oliver Walsh b7b6172626 Use cached huggingface auth token if it exists
Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2025-05-19 11:42:04 +01:00
Daniel J Walsh b04d88e9c4
Merge pull request #1423 from containers/renovate/registry.access.redhat.com-ubi9-ubi-9.x
Update registry.access.redhat.com/ubi9/ubi Docker tag to v9.6-1747219013
2025-05-18 08:18:10 -04:00
Daniel J Walsh 2f6b6d1f49
Merge pull request #1424 from containers/add-shortnames
Add smolvlm vision models
2025-05-18 08:17:14 -04:00
Eric Curtin e494a6d924 Add smolvlm vision models
For multimodal usage

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-05-18 12:02:01 +01:00
renovate[bot] 7c452618f8
Update registry.access.redhat.com/ubi9/ubi Docker tag to v9.6-1747219013
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-17 18:09:58 +00:00
Daniel J Walsh 520a8379a2
Merge pull request #1407 from makllama/xd/mthreads
Support Moore Threads GPU #1
2025-05-16 13:20:02 -04:00
Daniel J Walsh 9d65a2e546
Merge pull request #1422 from olliewalsh/hf_repo_norm
Normalize hf repo quant/tag
2025-05-16 11:29:29 -04:00
Daniel J Walsh 798db33f49
Merge pull request #1420 from rhatdan/except
Don't throw Exceptions, be more specific
2025-05-16 11:11:40 -04:00
Oliver Walsh ab96b97751 Normalize hf repo quant/tag
The huggingface repo tag refers to the quantization and is case insensitive.
Normalize this to uppercase.

Fixes: #1421

Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2025-05-16 15:28:59 +01:00
Daniel J Walsh a27e56cb16
Don't throw Exceptions, be more specific
Fixes: https://github.com/containers/ramalama/issues/1419

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-05-16 10:28:04 -04:00
Daniel J Walsh 924f38358d
Merge pull request #1409 from engelmi/add-port-mapping-to-gen
Added host:container port mapping to quadlet generation
2025-05-16 09:35:55 -04:00
Daniel J Walsh ffc9d46dda
Merge pull request #1416 from olliewalsh/multimodal
Multimodal/vision support
2025-05-16 09:34:57 -04:00
Eric Curtin 0dc0de1cf1
Merge pull request #1418 from containers/typo2
Small typo
2025-05-16 12:52:39 +01:00
Eric Curtin 98f17220f3 Small typo
Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-05-16 12:52:09 +01:00
Eric Curtin 270608f1c2
Merge pull request #1415 from containers/add-more-debug
Add more debug for non starting servers with "ramalama run"
2025-05-16 12:47:14 +01:00
Oliver Walsh 1e34882beb Omit unused tag when creating ModelScopeRepository instance
Co-authored-by: Michael Engel <mengel@redhat.com>
Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2025-05-16 12:24:51 +01:00
Eric Curtin 1bd1b2ae98 Add more debug for non starting servers with "ramalama run"
Sometimes the server doesn't start

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-05-16 11:56:41 +01:00
Michael Engel fff099f130
Validate --port option input
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-05-16 12:18:48 +02:00
Michael Engel 0707857dae
Added host:container port mapping to quadlet generation
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-05-16 12:18:48 +02:00
Oliver Walsh e9ae198547 Multimodal/vision support
Add support for pulling hf repos vs individual models, replicating
the `llama.cpp -hf <model>` logic.
Add support for mmproj file in model store snapshot.
If an mmproj file is available pass it on the llama.cpp command line.
Structure classes to continue support for modelscope as ModelScopeRepository
inherits from HuggingfaceRepository.

Example usage:
  $ ramalama serve huggingface://ggml-org/gemma-3-4b-it-GGUF
    ...
Open webui, upload a picture, ask for a description.

Fixes: #1405

Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2025-05-16 10:40:18 +01:00
Xiaodong Ye 267979fa44 Address review comments
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-05-15 19:20:31 +08:00
Xiaodong Ye b68c6b4c45 Address review comments
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-05-15 19:20:31 +08:00
Xiaodong Ye 7e4a0102af Address review comments
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-05-15 19:20:31 +08:00
Xiaodong Ye d33efcc5ec Address review comments
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-05-15 19:20:31 +08: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 04032f28c1
Merge pull request #1410 from makllama/xd/mthreads_doc
Support Moore Threads GPU #2
2025-05-15 09:44:51 +01:00
Xiaodong Ye e2faafa68e Address review comments
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-05-15 10:41:09 +08:00
Xiaodong Ye ae79ab16b2 Add doc for Moore Threads GPU
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-05-15 10:26:21 +08:00
Eric Curtin 9e01abf5ef
Merge pull request #1408 from bmahabirbu/ocr-cleanup
fix: removed ocr print statement and updated ocr description
2025-05-14 15:41:33 +01:00
Brian dd6e03f991
fix: removed ocr print statement and updated ocr description
Signed-off-by: Brian <bmahabir@bu.edu>
2025-05-14 10:04:57 -04:00
Daniel J Walsh e8f14a3e5b
Merge pull request #1400 from bmahabirbu/ocr
added a docling ocr flag ( text image recognition) flag to address RAM issue
2025-05-14 05:52:35 -04:00
Brian 2b5ee4e7c0
added a docling ocr flag ( text image recognition) flag to address RAM issue
Signed-off-by: Brian <bmahabir@bu.edu>
2025-05-13 22:51:21 -04:00
Daniel J Walsh daa2948ef6
Merge pull request #1399 from rhatdan/VERSION
Fix cuda builds installation of python3.11
2025-05-13 11:21:51 -04:00
Daniel J Walsh 5fa60ffb68
Merge pull request #1406 from sarroutbi/202505131640-include-building-containers-in-contributing-md
Include additional information in CONTRIBUTING.md
2025-05-13 11:20:57 -04:00
Sergio Arroutbi 2f0813c378
Include additional information in CONTRIBUTING.md
Include additional information such as:
- Possibility to generate containers through Makefile
- Possibility to generate coverage reports through Makefile

Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
2025-05-13 16:57:08 +02:00
Daniel J Walsh 091147d844
Merge pull request #1404 from sarroutbi/202505131435-include-minor-contributing-md-improvements
Add minor CONTRIBUTING.md enhancements
2025-05-13 09:50:22 -04:00
Daniel J Walsh 3490306484
Merge pull request #1403 from sarroutbi/202505131335-increase-cli-coverage
Increase cli.py coverage
2025-05-13 09:49:55 -04:00
Sergio Arroutbi a2a040f830
Increase cli.py coverage
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
2025-05-13 15:02:31 +02:00
Sergio Arroutbi f3cd12dce8
Add minor CONTRIBUTING.md enhancements
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
2025-05-13 14:36:23 +02:00
Daniel J Walsh e67cae5b66
Fix cuda builds installation of python3.11
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-05-13 08:28:20 -04:00
Eric Curtin c802a33b6b
Merge pull request #1402 from sarroutbi/202505131227-fix-pylint-issues
Fix issues reported by pylint for cli.py
2025-05-13 13:06:51 +01:00
Sergio Arroutbi 0030b8ae4c
Fix issues reported by pylint for cli.py
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
2025-05-13 13:25:48 +02:00
Daniel J Walsh 1c945ea06d
Merge pull request #1398 from containers/less-paths-added
Remove all path additions to this file
2025-05-13 05:43:50 -04:00
Eric Curtin 35dc8aac2f Remove all path additions to this file
This was added when we didn't have good installation techniques
for mac. We have pipx which was not intuitive and a hacked
together shell script as an alternative. Now that we have brew and
uv integrated we don't need this code.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-05-13 10:16:56 +01:00
Eric Curtin 935dc717b1
Merge pull request #1396 from containers/build-fix-2
Fix builds
2025-05-13 09:58:46 +01:00
Eric Curtin 36137ac613 Fix builds
Use array for list of packages. Move start of script execution
after all function definitions.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-05-13 09:58:19 +01:00
Eric Curtin a4bcd52d14
Merge pull request #1395 from ieaves/imp/main-error-reporting
Using perror in cli.main
2025-05-12 19:54:12 +01:00
Ian Eaves 0238164464 switched cli.main away from print to perror
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
2025-05-12 13:22:44 -05:00
Daniel J Walsh 4ad7812185
Merge pull request #1393 from containers/reword-description
This script is not macOS only
2025-05-12 12:27:53 -04:00
Daniel J Walsh e7e8182fec
Merge pull request #1391 from rhatdan/VERSION
Bump to 0.8.3
2025-05-12 12:25:16 -04:00
Eric Curtin f7296d0e23 This script is not macOS only
This script works for many platforms and generally does the right
thing.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-05-12 17:07:13 +01:00
Daniel J Walsh 730a09dba3
Merge pull request #1392 from containers/change-install-url
Shorten url in README.md
2025-05-12 12:04:39 -04:00
Daniel J Walsh 71872f8ced
Bump to v0.8.3
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-05-12 12:02:34 -04:00
Eric Curtin c5ea7fc9d1 Shorten url in README.md
This is now installable via https://ramalama.ai/install.sh

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-05-12 16:57:43 +01:00
Daniel J Walsh 4f240699da
Merge pull request #1389 from containers/punctuation-consistency-2
More de-duplication and consistency
2025-05-12 07:48:12 -04:00
Eric Curtin 24698d1c4b More de-duplication and consistency
After the modelscope changes

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-05-12 12:02:18 +01:00
Daniel J Walsh beba6bb066
Merge pull request #1371 from engelmi/add-output-path-to-generate
Add output path to generate quadlet/kube
2025-05-12 06:21:57 -04:00
Daniel J Walsh e06824a572
Merge pull request #1381 from makllama/xd/modelscope
Add support for modelscope and update doc
2025-05-12 06:17:32 -04:00
Michael Engel 1323b25a7a
Added unit and system test for generate change
Added unit tests for new parsing feature of --generate option as
well as for the refactored quadlet file generation. In addition,
a system test has been added to verify the output directory of
the --generate option works as expected.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-05-12 11:59:38 +02:00
Michael Engel 385a82ab69
Added support for expanding user directory in IniFile and PlainFile
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-05-12 11:59:37 +02:00
Michael Engel 0a90abe25a
Extended --generate option by output directory
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-05-12 11:59:37 +02:00
Michael Engel 56bea00ea7
Refactor kube generation by wrapping in file class
Signed-off-by: Michael Engel <mengel@redhat.com>
2025-05-12 11:59:37 +02:00
Michael Engel fe19a7384a
Refactor quadlet generation for use of configparser
Instead of writing the quadlet string manually, lets use the
configparser from the standard library. A slim wrapper class
has been added as well to simplify the usage of configparser.
In addition, the generated quadlets are not directly written to
file, but instead the inifile instances are returned. This
implies that the caller needs to do the write_to_file call and
enables writing simple unit tests for the generation.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-05-12 11:59:37 +02:00
Eric Curtin 107cd50e63
Merge pull request #1363 from melodyliu1986/melodyliu1986-feature-branch
update the shortnames path according to the shortnames.py
2025-05-12 10:53:20 +01:00
Eric Curtin 2b8cdbbe83
Merge pull request #1387 from makllama/xd/docker_build
Fix #1382
2025-05-12 10:44:30 +01:00
Eric Curtin 505061c0af
Merge pull request #1388 from nathan-weinberg/mac-no-bats
ci(fix): macOS runner didn't have bats
2025-05-12 10:43:31 +01:00
Song Liu 4beb41aca6 update the shortnames path according to the shortnames.py
Signed-off-by: Song Liu <soliu@redhat.com>
2025-05-12 16:01:11 +08:00
Nathan Weinberg a80a556332
Merge pull request #1386 from containers/punctuation-consistency
Punctuation consistency when pulling models
2025-05-11 23:05:43 -04:00
Nathan Weinberg 2a1317936a ci(fix): macOS runner didn't have bats
couldn't run e2e tests

also consolidated all package installs into one step

Signed-off-by: Nathan Weinberg <nathan2@stwmd.net>
2025-05-11 22:55:06 -04:00
Xiaodong Ye 1801378950 Fix #1382
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-05-12 10:32:23 +08:00
Xiaodong Ye 34af059f3d Address issues found by CI
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-05-12 09:52:16 +08:00
Eric Curtin 8f112e7c0d Punctuation consistency when pulling models
Around spacing

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-05-11 19:38:18 +01:00
Daniel J Walsh b183d0e4f5
Merge pull request #1383 from makllama/xd/docker
Support older version of Docker
2025-05-11 11:46:09 -04:00
Eric Curtin fad29e5bac
Merge pull request #1380 from antbbn/patch-1
Check nvidia-container-runtime executable also in engine.py
2025-05-11 15:39:57 +01:00
Eric Curtin 4505758ca2
Merge pull request #1384 from nathan-weinberg/more-ci-fixes
ci: additional fixes and cleanup for image build jobs
2025-05-11 13:56:49 +01:00
Xiaodong Ye 590199c9dd Address review comments
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-05-11 14:04:03 +08:00
Xiaodong Ye 9e410944cb Add unit tests
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-05-11 13:54:18 +08:00
Xiaodong Ye 1aac29e783 Address review comments
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-05-11 11:56:58 +08:00
Nathan Weinberg f5313251ad ci: additional fixes and cleanup for image build jobs
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-05-10 16:24:32 -04:00
Xiaodong Ye d32d6ed6dd Support older version of Docker
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-05-10 20:51:28 +08:00
Xiaodong Ye 9985b9ef75 Format changes for passing CI
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-05-10 20:48:37 +08:00
Antonio Bibiano bff58da5d4 Update test in case nvidia-container-runtime binary is not present
Signed-off-by: Antonio Bibiano <antbbn@gmail.com>
2025-05-10 14:37:50 +02:00
Antonio Bibiano 5adaa9b8b8 Check nvidia-container-runtime executable also in engine.py
Signed-off-by: Antonio Bibiano <antbbn@gmail.com>
2025-05-10 14:14:24 +02:00
Xiaodong Ye 15da984fe0 Add support for modelscope
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-05-10 19:51:08 +08:00
Eric Curtin 177397c346
Merge pull request #1375 from nathan-weinberg/fix-image-jobs
ci: modify 'latest' job to only run on release
2025-05-10 12:31:06 +01:00
Daniel J Walsh 6392d3c7e9
Merge pull request #1378 from TristanCacqueray/vision-support
Update llama_cpp_sha to the latest version
2025-05-10 06:32:40 -04:00
Tristan Cacqueray 6e4c290ca2 Update llama_cpp_sha to the latest version
This change brings vision support to the rpc-server.

Signed-off-by: Tristan Cacqueray <tdecacqu@redhat.com>
2025-05-10 11:07:34 +02:00
Nathan Weinberg 1281879f9f ci: modify 'latest' job to only run on release
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-05-09 13:10:20 -04: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
Daniel J Walsh d381120860
Merge pull request #1373 from rhatdan/build
Make version optional in build
2025-05-09 10:33:29 -04:00
Daniel J Walsh 17d91fbe24
Merge pull request #1372 from nathan-weinberg/ci-tweaks
Various CI fixes
2025-05-09 10:15:14 -04:00
Daniel J Walsh 5260ad701a
Make version optional in build
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-05-09 10:14:04 -04:00
Nathan Weinberg c8e992846f ci(docs): add CI report matrix
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-05-09 09:28:16 -04:00
Nathan Weinberg 2db912c383 ci(chore): remove incorrect 'Fedora' message from install job
also remove some trailing whitespace

Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-05-09 09:27:26 -04:00
Nathan Weinberg 01691fe899 ci(fix): fix regex for CI image job
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-05-09 09:27:26 -04:00
Nathan Weinberg 99bdf6097f ci(fix): add 'make install-requirements' to 'latest' and 'nightly' jobs
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-05-09 09:27:26 -04:00
Eric Curtin 340c417820
Merge pull request #1370 from jelly/404-urls
Update not found urls
2025-05-09 13:17:21 +01:00
Eric Curtin d740fc6135
Merge pull request #1367 from rhatdan/rag
Use python3.11 on systems with older python
2025-05-09 13:16:58 +01:00
Jelle van der Waa 3c253faed6 Update podman markdown links
Signed-off-by: Jelle van der Waa <jvanderwaa@redhat.com>
2025-05-09 14:16:14 +02:00
Jelle van der Waa a08af92c55 Update llama.cpp documentation url
Signed-off-by: Jelle van der Waa <jvanderwaa@redhat.com>
2025-05-09 14:09:11 +02:00
Daniel J Walsh a3beed7d14
Merge pull request #1369 from mcornea/cuda_all_devices
Use all GPUs in CUDA_VISIBLE_DEVICES as default
2025-05-09 06:10:56 -04:00
Marius Cornea 2a218f8bce Use all GPUs in CUDA_VISIBLE_DEVICES as default
Currently the CUDA_VISIBLE_DEVICES environment variable defaults to '0'
when it's not overidden by the user. This commit updates it to include all
available GPUs detected by nvidia-smi, allowing the application to
utilize multiple GPUs by default.

Signed-off-by: Marius Cornea <mcornea@redhat.com>
2025-05-09 09:51:36 +03:00
Daniel J Walsh 317103e542
Use python3.11 on systems with older python
Fixes: https://github.com/containers/ramalama/issues/1362

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-05-08 13:27:45 -04:00
Eric Curtin ae57590e66
Merge pull request #1366 from mikebonnet/fix-client-cmd
fix "ramalama client"
2025-05-08 16:55:05 +01:00
Eric Curtin 3ab554f155
Merge pull request #1359 from rhatdan/docling
Allow docling to handle URLs rather then handling locally
2025-05-08 16:04:46 +01:00
Mike Bonnet 2d7407cc90 fix "ramalama client"
get_cmd_with_wrapper() was changed in 849813f8 to accept a single string argument instead
of a list. Update cli.py to pass only the first element of the list.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-05-08 07:46:19 -07:00
Daniel J Walsh 0e616778eb
Merge pull request #1361 from mikebonnet/rag-build-tweaks
small improvements to the build of the ramalama-rag image
2025-05-08 08:46:27 -04:00
Daniel J Walsh 0530c1e6bf
Merge pull request #1364 from sarroutbi/202505081057-extend-tomlparser-coverity
Extend TOMLParser coverage to 100%
2025-05-08 08:39:29 -04:00
Daniel J Walsh b5e6269e81
Merge pull request #1365 from sarroutbi/202505081128-groom-coverage-rules
Groom coverage rules, genreate xml/lcov reports
2025-05-08 08:37:01 -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
Sergio Arroutbi 675f302f1c
Extend TOMLParser coverage to 100%
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
2025-05-08 11:12:49 +02:00
Daniel J Walsh b4dc9ad977
Merge pull request #1355 from mcornea/fix_cuda_devices
Allow user-defined CUDA_VISIBLE_DEVICES environment variable
2025-05-07 14:18:59 -04:00
Marius Cornea 0db9aac978
Allow user-defined CUDA_VISIBLE_DEVICES environment variable
The check_nvidia function was previously overriding any user-defined
CUDA_VISIBLE_DEVICES environment variable with a default value of "0".
This change adds a check to only set CUDA_VISIBLE_DEVICES=0 when it's not
already present in the environment.

Signed-off-by: Marius Cornea <mcornea@redhat.com>
2025-05-07 21:08:55 +03:00
Mike Bonnet e8415fc4da build_rag.sh: set the pip installation prefix to /usr
This is consistent with how pip installs packages in the base ramalama image.

Remove some redundant package names from docling(), they're already installed in rag().

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-05-07 10:49:38 -07:00
Mike Bonnet c4d9940e56 install git-core instead of git
Avoid pulling in a bunch of unnecessary perl packages.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-05-07 10:49:38 -07:00
Mike Bonnet ed5e8a3dce build_rag.sh: fix logic error when building from a UBI9-based image
"$VERSION_ID" is set to "9.5" when building from a UBI9-based image (the default). This fails
the "-ge" test. Check if "$ID" is "fedora" before assuming "$VERSION_ID" is an integer.

If python3.11 is getting installed, also install python3.11-devel explicitly.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2025-05-07 10:49:04 -07:00
Daniel J Walsh 8a0f0f2038
Allow docling to handle URLs rather then handling locally
Docling has support for pulling html pages, and we were not pulling them
correctly.

Also support --dryrun

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-05-07 13:04:04 -04:00
Daniel J Walsh 30c13c04d1
Merge pull request #1360 from nathan-weinberg/update-lls-container
chore: update curl commands in llama-stack Containerfile
2025-05-07 13:00:29 -04:00
Nathan Weinberg 071426e2e7 chore: update curl commands in llama-stack Containerfile
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-05-07 12:05:13 -04: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
Daniel J Walsh 7cc1052e0c
Merge pull request #1356 from sarroutbi/202505062329-add-test-tomlparser-unit-test
Add TOMLParser unit tests
2025-05-07 08:25:41 -04:00
Sergio Arroutbi feb46d7c5c
Add TOMLParser unit tests
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
2025-05-07 12:10:52 +02:00
Eric Curtin a4cf5cca48
Merge pull request #1358 from sarroutbi/202505062219-install-coverity-tools-and-execute-them
Add coverage tools, run them via specific rules
2025-05-07 11:08:29 +01: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
Eric Curtin 279a5ff32c
Merge pull request #1353 from engelmi/use-model-type-instead-of-class-name
Use model type instead of class name
2025-05-06 21:44:56 +01:00
Michael Engel 5e5e35b4b5
Use model type instead of class name
Relates to: https://github.com/containers/ramalama/issues/1325
Follow-up of: https://github.com/containers/ramalama/pull/1350

Previously, the model_type member of the model store has been set to
the class name of the model, which mapped URL types like http or file
to url. This is now changed to use the model_type property of the
model class. It is, by default, still the inferred class name, except
in the URL class where it gets set to the URL scheme.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-05-06 15:39:50 +02:00
Daniel J Walsh ae9c30d50c
Merge pull request #1345 from containers/change-to-cli-serve
Use CLI ramalama serve here
2025-05-06 08:51:20 -04:00
Eric Curtin dfa7ec81db
Merge pull request #1349 from rhatdan/options
Consolidate and alphabetize runtime options
2025-05-06 13:50:41 +01:00
Eric Curtin 1496e13108 Use CLI ramalama serve here
It's easier to debug, we can do ps -ef, etc. Easier to code also.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-05-06 13:00:50 +01:00
Eric Curtin da4f3b5489
Merge pull request #1350 from engelmi/fix-partial-model-listing
Fix partial model listing
2025-05-06 12:42:49 +01:00
Daniel J Walsh 3f95d053cc
Consolidate and alphabetize runtime options
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-05-06 07:31:06 -04:00
Daniel J Walsh f57404ff2e
Merge pull request #1352 from sarroutbi/202505061305-minor-typo
Fix typo (RAMALAMA_TRANSPORTS->RAMALAMA_TRANSPORT)
2025-05-06 07:28:10 -04:00
Sergio Arroutbi 9beeb29c59
Fix typo (RAMALAMA_TRANSPORTS->RAMALAMA_TRANSPORT)
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
2025-05-06 13:06:28 +02:00
Michael Engel fa4f40f547
Map url:// prefix of model name to URL class
Relates to: https://github.com/containers/ramalama/issues/1325

In the list models function only the url:// prefix is present.
Passing a listed model to the factory can not map this model
input correctly to the URL model class. Therefore, this gets
extended and the unit tests updated by appropriate cases.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-05-06 12:31:44 +02:00
Michael Engel 53e51c72c5
Remove partial postfix from model name
Relates to: https://github.com/containers/ramalama/issues/1325

Instead of appending the (partial) identifier directly, the returned
ModelFile class is extended to indicate if the file is partially
downloaded or not.

Signed-off-by: Michael Engel <mengel@redhat.com>
2025-05-06 12:29:41 +02:00
Daniel J Walsh 3813a01e04
Merge pull request #1346 from rhatdan/VERSION
Bump to v0.8.2
2025-05-05 11:34:15 -04:00
Daniel J Walsh 982e70d51b
Bump to v0.8.2
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-05-05 10:35:02 -04:00
Daniel J Walsh 969e0f6b36
Merge pull request #1347 from containers/if-run-ramalama-exists
Only execute this if /run/ramalama exists
2025-05-05 10:34:52 -04:00
Eric Curtin 800224e6ee Only execute this if /run/ramalama exists
Using this script to install llama.cpp and whisper.cpp bare metal
on a bootc system, the build stops executing here:

+ ln -sf /usr/bin/podman-remote /usr/bin/podman
+ python3 -m pip install /run/ramalama --prefix=/usr
ERROR: Invalid requirement: '/run/ramalama': Expected package name at the start of dependency specifier
    /run/ramalama
    ^
Hint: It looks like a path. File '/run/ramalama' does not exist.
Error: building at STEP "RUN chmod a+rx /usr/bin/build_llama_and_whisper.sh && build_llama_and_whisper.sh "rocm"": while running runtime: exit status 1

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-05-05 14:40:55 +01:00
Eric Curtin f1668aea45
Merge pull request #1344 from schuellerf/patch-1
Update ramalama-cuda.7.md
2025-05-05 13:32:56 +01:00
Florian Schüller d6a21a9582 Update ramalama-cuda.7.md
Looks like a typo?

Signed-off-by: Florian Schüller <florian.schueller@redhat.com>
2025-05-05 11:24:03 +02:00
Eric Curtin 5670fc0d66
Merge pull request #1339 from benoitf/ignore-none
fix: ignore <none>:<none> images
2025-05-05 07:13:36 +01:00
Eric Curtin c4f7aaa953
Merge pull request #1343 from xxiong2021/main
according to Commit 1d36b36, the files path was changed
2025-05-05 06:38:03 +01:00
Xiaoqiang Xiong 0b815654cf according to Commit 1d36b36, the files path was changed
Signed-off-by: Xiaoqiang Xiong <xxiong@redhat.com>
2025-05-05 11:31:26 +08:00
Florent Benoit d43b715d78 fix: ignore <none>:<none> images
related to https://github.com/containers/ramalama/issues/904

Signed-off-by: Florent Benoit <fbenoit@redhat.com>
2025-05-04 21:39:08 +02:00
Daniel J Walsh 34f8cf2d50
Merge pull request #1336 from rhatdan/llama-stack
INFERENCE_MODEL should be set by the container engine
2025-05-03 06:51:00 -04:00
Daniel J Walsh d6b3b2da14
INFERENCE_MODEL should be set by the container engine
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-05-02 11:12:56 -04:00
Eric Curtin 449b7b7fbd
Merge pull request #1335 from rhatdan/llama-stack
llama stack run should be the CMD not run during build
2025-05-02 12:04:37 +01:00
Daniel J Walsh e81cab92c4
llama stack run should be the CMD not run during build
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-05-02 06:34:54 -04:00
Daniel J Walsh 1846fb8611
Merge pull request #1328 from containers/add-comment
Describe what this test does
2025-05-02 06:11:10 -04:00
Daniel J Walsh b18030fca3
Merge pull request #1334 from containers/ramalama-shell-fixes
RamaLamaShell fixes
2025-05-02 06:10:36 -04:00
Eric Curtin ba485eec11
Merge pull request #1332 from containers/make-install-more-resiliant
Make installer more resilliant
2025-05-02 10:40:36 +01:00
Eric Curtin 995d0b1cd8 RamaLamaShell fixes
Was testing this, found some bugs, mainly caused by the recursive
call of cmdloop. Fixed this by using no recursion. Some
refactorings.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-05-02 10:39:16 +01:00
Eric Curtin 8ec74cb553
Merge pull request #1333 from bmahabirbu/mac-fix
Fixed mac gpu not being enabled from stale global var check
2025-05-02 09:33:46 +01:00
Eric Curtin abb2cf47fa
Merge pull request #1329 from containers/mistral-small
Add shortnames for mistral-small3.1 model
2025-05-02 09:33:07 +01:00
Brian 8a02b1d0d3
Fixed mac gpu not being enabled from stale global var check
Signed-off-by: Brian <bmahabir@bu.edu>
2025-05-02 00:00:20 -04: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
Daniel J Walsh 88a56ab35f
Merge pull request #1331 from rhatdan/llama-stack
Fixup use of /.venv
2025-05-01 14:47:18 -04:00
Daniel J Walsh 907cb41315
Fixup use of /.venv
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-05-01 14:38:14 -04:00
Daniel J Walsh 9a7444c6dc
Merge pull request #1330 from nathan-weinberg/container-fix
fix: additional fixes for llama-stack Containerfile
2025-05-01 14:35:47 -04:00
Nathan Weinberg 0ed1029e31 fix: additional fixes for llama-stack Containerfile
update locations of YAML files and fix typo with 'uv run'

Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-05-01 14:05:48 -04:00
Eric Curtin 2c48af0175 Add shortnames for mistral-small3.1 model
Another Ollama model that's only compatible with Ollama's forking
of llama.cpp

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-05-01 17:48:46 +01:00
Eric Curtin c7b92e1564 Describe what this test does
It failed for me once

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-05-01 16:57:32 +01:00
Daniel J Walsh 023f875427
Merge pull request #1327 from rhatdan/docs
Expose http line in man pages
2025-05-01 11:46:13 -04:00
Eric Curtin 39c29b2857
Merge pull request #1158 from containers/use-wrapper-everywhere
Turn on client/server implementation of run
2025-05-01 15:15:49 +01:00
Daniel J Walsh e2f382ab62
Expose http line in man pages
The llama.cpp documentation links is lost when we convert markdown to
nroff format. This change will expose the link in man pages.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-05-01 09:45:12 -04:00
Eric Curtin 849813f8b7 Turn on client/server implementation of run
Now that we've had one release with the wrapper scripts included
in the container images it should be safe to turn this on
everywhere.

Only add libexec for commands that have wrappers

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-05-01 14:13:10 +01:00
Daniel J Walsh 38a57687dd
Merge pull request #1323 from rhatdan/docs
Switch all Ramalama to RamaLama
2025-05-01 06:15:01 -04:00
Daniel J Walsh ee588cecee
Switch all Ramalama to RamaLama
Fix Ramalama names that have snuck into the repo.
Cleanup whitespace in README.md doc.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-05-01 06:13:42 -04:00
Daniel J Walsh 9b639c6172
Merge pull request #1320 from arburka/main
Update Docs page
2025-05-01 05:31:12 -04:00
Daniel J Walsh 2c4693a3bd
Merge pull request #1319 from arburka/patch-1
Updates to ReadMe doc
2025-05-01 05:27:12 -04:00
arburka 1de54a92e3 Content Update to ramalama docs/readme file
Signed-off-by: arburka <88330245+arburka@users.noreply.github.com>
2025-04-30 21:46:51 -04:00
arburka 20868bf17b Updated Ramalama README.md for readability, clarity, and scanability improvments
Signed-off-by: arburka <88330245+arburka@users.noreply.github.com>

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-04-30 21:24:37 -04:00
Eric Curtin 8f6e135bb2
Merge pull request #1317 from rhatdan/llama-stack
Fix up several issue in llama-stack Containerfile
2025-04-30 20:16:18 +01:00
Daniel J Walsh 18333b431d
Fix up several issue in llama-stack Containerfile
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-04-30 15:12:42 -04:00
Daniel J Walsh 922ac6bc6b
Merge pull request #1314 from nathan-weinberg/lls-container
feat: update llama-stack Containerfile to use ramalama-stack
2025-04-30 15:00:58 -04:00
Daniel J Walsh ad27acb095
Merge pull request #1312 from containers/simplify-install-script
Simplify installer
2025-04-30 13:57:48 -04: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
Nathan Weinberg e5dde374b7 feat: update llama-stack Containerfile to use ramalama-stack
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-04-30 11:30:08 -04:00
Daniel J Walsh 21257c3d79
Merge pull request #1311 from dougsland/smi
common: adjust nvidia-smi for check cuda version
2025-04-30 09:47:12 -04:00
Douglas Landgraf 393a67b9b0 common: adjust nvidia-smi for check cuda version
Be compatible with both versions of nvidia-smi
with version flag or not.

Signed-off-by: Douglas Landgraf <dlandgra@redhat.com>
2025-04-30 09:05:24 -04:00
Daniel J Walsh db8f30ec18
Merge pull request #1292 from containers/pass-args-to-ramalama-run-core
Pass args to ramalama run core
2025-04-30 08:14:46 -04:00
Eric Curtin bb259ad7af Pass args to *core scripts
Ensure arguments are passed to *core scripts

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2025-04-30 11:55:44 +01:00
Daniel J Walsh a13764c363
Merge pull request #1309 from sarroutbi/202504292004-avoid-unused-parameter
Avoid unused parameter
2025-04-29 15:49:55 -04:00
Sergio Arroutbi d1c0eda2aa
Avoid unused parameter
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
2025-04-29 20:05:44 +02:00
263 changed files with 19264 additions and 7373 deletions

View File

@ -2,6 +2,7 @@ hugginface->huggingface
ramalamay->ramalama
ramamlama->ramalama
olama->ollama
lama.cpp->llama.cpp
alterting->altering
annotationg->annotating
assemlbe->assemble

View File

@ -1,15 +0,0 @@
# https://github.com/codespell-project/codespell#using-a-config-file
[codespell]
# Comma-separated list of files to skip.
skip = ./logos,./vendor,./.git #,bin,vendor,.git,go.sum,changelog.txt,.cirrus.yml,"RELEASE_NOTES.md,*.xz,*.gz,*.tar,*.tgz,bin2img,*ico,*.png,*.1,*.5,*.7,copyimg,*.orig,apidoc.go"
# Comma separated list of words to be ignored. Words must be lowercased.
ignore-words-list = clos,creat,ro,hastable,shouldnot,mountns,passt,assertin
# Custom dictionary file that contains spelling corrections.
# Run with option '--dictionary=-' to include also default dictionary.
dictionary = .codespelldict
# Check file names as well.
check-filenames = true

View File

@ -1,4 +1,5 @@
[flake8]
max-line-length = 120
# E203,E221,E231 conflict with black formatting
extend-ignore = E203,E221,E231,E702
extend-ignore = E203,E221,E231,E702,F824
extend-exclude = .venv,venv

View File

@ -6,22 +6,19 @@ name: ci images
on:
pull_request:
paths:
- "**/container-images/**"
- "container-images/**"
- ".github/workflows/ci-images.yml"
paths-ignore:
- "**/container-images/rocm"
push:
branches:
- main
paths:
- "**/container-images/**"
- "container-images/**"
- ".github/workflows/ci-images.yml"
paths-ignore:
- "**/container-images/rocm"
jobs:
build:
runs-on: ubuntu-24.04
timeout-minutes: 120
steps:
- name: Checkout
uses: actions/checkout@v4
@ -52,21 +49,17 @@ jobs:
- name: Free Disk Space Linux
shell: bash
run: |
sudo docker rmi "$(docker image ls -aq)" >/dev/null 2>&1 || true
sudo mkdir -m a=rwx -p /mnt/tmp /mnt/runner
sudo mkdir -m o=rwx -p /home/runner/.local
sudo chown runner:runner /mnt/runner /home/runner/.local
sudo mount --bind /mnt/runner /home/runner/.local
sudo rm -rf \
/usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
/usr/lib/jvm || true
# /mnt has ~ 65 GB free disk space. / is too small.
- name: Reconfigure Docker data-root
run: |
sudo mkdir -p /mnt/docker /etc/docker
echo '{"data-root": "/mnt/docker"}' > /tmp/daemon.json
sudo mv /tmp/daemon.json /etc/docker/daemon.json
cat /etc/docker/daemon.json
sudo systemctl restart docker.service
df -h
/usr/share/dotnet /usr/lib/jvm /opt/hostedtoolcache/CodeQL \
"$AGENT_TOOLSDIRECTORY" || true
sudo swapoff -a
sudo rm -f /mnt/Swapfile
- name: Print disk space after cleanup
shell: bash
@ -75,4 +68,4 @@ jobs:
- name: Build Images
run: |
./container_build.sh -r -c build
./container_build.sh -r -c -s build

View File

@ -10,13 +10,20 @@ jobs:
lint:
name: Lint Code
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv and activate the environment
uses: astral-sh/setup-uv@v6
with:
activate-environment: true
- name: Install dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y bash codespell python3-argcomplete pipx
sudo apt-get install -y bash codespell python3-argcomplete
make install-requirements
- name: Run format check
@ -27,31 +34,102 @@ jobs:
run: |
make lint
unit-test:
name: Unit Tests
build-image:
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv and activate the environment
uses: astral-sh/setup-uv@v6
with:
activate-environment: true
- name: Install dependencies
shell: bash
run: |
df -h
sudo apt-get update
sudo apt-get install -y bash codespell python3-argcomplete pipx
sudo apt-get install -y bash codespell python3-argcomplete pipx podman
make install-requirements
- name: Upgrade to podman 5
run: |
set -e
# /mnt has ~ 65 GB free disk space. / is too small.
sudo mkdir -m a=rwx -p /mnt/tmp /mnt/runner
sudo mkdir -m o=rwx -p /home/runner/.local
sudo chown runner:runner /mnt/runner /home/runner/.local
sudo mount --bind /mnt/runner /home/runner/.local
# Enable universe repository which contains podman
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu oracular universe"
# Update package lists
sudo apt-get update
sudo apt-get purge firefox
# Install specific podman version
sudo apt-get upgrade
- name: Build a container for CPU inferencing
shell: bash
run: |
./container_build.sh build -s ramalama
unit-test:
name: Unit Tests
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv and activate the environment
uses: astral-sh/setup-uv@v6
with:
activate-environment: true
- name: Install dependencies
shell: bash
run: |
df -h
sudo apt-get update
sudo apt-get install -y bash codespell python3-argcomplete pipx podman
make install-requirements
- name: Upgrade to podman 5
run: |
set -e
# Enable universe repository which contains podman
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu oracular universe"
# Update package lists
sudo apt-get update
sudo apt-get purge firefox
# Install specific podman version
sudo apt-get upgrade
- name: Run unit tests
run: |
make unit-tests
bats:
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv and activate the environment
uses: astral-sh/setup-uv@v6
with:
activate-environment: true
- name: install bats
shell: bash
run: |
df -h
# /mnt has ~ 65 GB free disk space. / is too small.
sudo mkdir -m a=rwx -p /mnt/tmp /mnt/runner
sudo mkdir -m o=rwx -p /home/runner/.local
sudo chown runner:runner /mnt/runner /home/runner/.local
sudo mount --bind /mnt/runner /home/runner/.local
sudo apt-get update
sudo apt-get install podman bats bash codespell python3-argcomplete pipx
sudo apt-get install podman bats bash codespell python3-argcomplete
make install-requirements
- name: install ollama
@ -69,25 +147,32 @@ jobs:
# Install specific podman version
sudo apt-get upgrade
- name: Build a container for CPU inferencing
run: ./container_build.sh build ramalama
- name: run bats
run: |
TEMPDIR=/mnt/tmp
make validate
make bats
bats-nocontainer:
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv and activate the environment
uses: astral-sh/setup-uv@v6
with:
activate-environment: true
- name: install bats
shell: bash
run: |
df -h
sudo apt-get update
sudo apt-get install podman bats bash codespell python3-argcomplete pipx git cmake libcurl4-openssl-dev
sudo apt-get install podman bats bash codespell python3-argcomplete git cmake libcurl4-openssl-dev
make install-requirements
sudo ./container-images/scripts/build_llama_and_whisper.sh
sudo python -m pip install . --prefix=/usr
- name: install ollama
shell: bash
@ -110,13 +195,20 @@ jobs:
docker:
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv and activate the environment
uses: astral-sh/setup-uv@v6
with:
activate-environment: true
- name: install bats
shell: bash
run: |
sudo apt-get update
sudo apt-get install bats bash codespell python3-argcomplete pipx
sudo apt-get install bats bash codespell python3-argcomplete
make install-requirements
- name: install ollama
@ -151,11 +243,12 @@ jobs:
sudo mv /tmp/daemon.json /etc/docker/daemon.json
cat /etc/docker/daemon.json
sudo systemctl restart docker.service
sudo mkdir -m a=rwx -p /mnt/tmp /mnt/runner
sudo mkdir -m o=rwx -p /home/runner/.local
sudo chown runner:runner /mnt/runner /home/runner/.local
sudo mount --bind /mnt/runner /home/runner/.local
df -h
- name: Build a container for CPU inferencing
run: ./container_build.sh build ramalama
- name: bats-docker
run: |
docker info
@ -163,8 +256,20 @@ jobs:
macos:
runs-on: macos-14
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv and activate the environment
uses: astral-sh/setup-uv@v6
with:
activate-environment: true
- name: install mlx-lm
shell: bash
run: |
uv pip install mlx-lm
- name: install golang
shell: bash
run: |
@ -180,7 +285,6 @@ jobs:
run: |
make install-requirements
make validate
pipx install .
make bats-nocontainer
# FIXME: ci script should be able to run on MAC.

View File

@ -12,7 +12,7 @@ jobs:
install_ramalama:
strategy:
matrix:
os: [ubuntu-latest, macos-latest] # Runs on Ubuntu, macOS, and Fedora
os: [ubuntu-latest, macos-latest] # Runs on Ubuntu and macOS
runs-on: ${{ matrix.os }}
@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v4
- name: Set Up Dependencies (Ubuntu)
timeout-minutes: 10
timeout-minutes: 20
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install -y lshw curl
@ -38,12 +38,12 @@ jobs:
run: |
chmod +x install.sh
./install.sh -l
- name: Verify RamaLama installation
run: |
ramalama ls | grep NAME
- name: Ramalama info
- name: RamaLama info
run: |
ramalama info

View File

@ -1,14 +1,17 @@
name: latest-build
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
release:
types:
- published
workflow_dispatch:
jobs:
linux:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Checkout ramalama
uses: actions/checkout@v4
- name: Free Disk Space Linux
shell: bash
run: |
@ -51,17 +54,27 @@ jobs:
- name: Build a container for CPU inferencing
run: ./container_build.sh build ramalama
- name: Run a one-line script
- name: Install end-to-end test requirements
run: |
sudo apt-get install bats
make install-requirements
- name: Run end-to-end tests
run: make end-to-end-tests
macos:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: install golang
- name: Checkout ramalama
uses: actions/checkout@v4
- name: Install end-to-end test requirements
shell: bash
run: brew install go
- name: Run a one-line script
run: |
brew install go shellcheck bats
make install-requirements
- name: Run end-to-end tests
shell: bash
run: make end-to-end-tests
@ -69,9 +82,8 @@ jobs:
runs-on: ubuntu-24.04
needs: [linux, macos]
steps:
- uses: actions/checkout@v4
with:
ref: 's'
- name: Checkout ramalama
uses: actions/checkout@v4
- name: Upgrade to podman 5
run: |
@ -112,19 +124,19 @@ jobs:
run: |
df -h
- name: install qemu-user-static
- name: Install qemu-user-static
run: |
sudo apt-get update
sudo apt-get install qemu-user-static
- name: Login to Registry
- name: Login to quay
uses: redhat-actions/podman-login@v1.7
with:
registry: quay.io
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: use buildah to build images for amd and aarch64
- name: Build images for amd64 and aarch64
uses: redhat-actions/buildah-build@v2
id: build_image
with:
@ -134,7 +146,7 @@ jobs:
container-images/ramalama/Containerfile
platforms: linux/amd64, linux/arm64
- name: push images to registry
- name: Push images to quay
uses: redhat-actions/push-to-registry@v2.8
with:
image: ramalama/ramalama

View File

@ -1,14 +1,16 @@
name: nightly-build
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
linux:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Checkout ramalama
uses: actions/checkout@v4
- name: Free Disk Space Linux
shell: bash
run: |
@ -43,20 +45,35 @@ jobs:
- name: Docker info
run: docker info
- name: Print disk space after cleanup
shell: bash
run: |
df -h
- name: Build a container for CPU inferencing
run: ./container_build.sh build ramalama
- name: Run a one-line script
- name: Install end-to-end test requirements
run: |
sudo apt-get install bats
make install-requirements
- name: Run end-to-end tests
run: make end-to-end-tests
macos:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: install golang
- name: Checkout ramalama
uses: actions/checkout@v4
- name: Install end-to-end test requirements
shell: bash
run: brew install go
- name: Run a one-line script
run: |
brew install go shellcheck bats
make install-requirements
- name: Run end-to-end tests
shell: bash
run: make end-to-end-tests
@ -64,9 +81,8 @@ jobs:
runs-on: ubuntu-24.04
needs: [linux, macos]
steps:
- uses: actions/checkout@v4
with:
ref: 'main'
- name: Checkout ramalama
uses: actions/checkout@v4
- name: Upgrade to podman 5
run: |
@ -84,14 +100,14 @@ jobs:
sudo apt-get update
sudo apt-get install qemu-user-static
- name: Login to Registry
- name: Login to quay
uses: redhat-actions/podman-login@v1.7
with:
registry: quay.io
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: use buildah to build images for amd and aarch64
- name: Build images for amd64 and arm64
uses: redhat-actions/buildah-build@v2
id: build_image
with:
@ -101,7 +117,7 @@ jobs:
container-images/ramalama/Containerfile
platforms: linux/amd64, linux/arm64
- name: push images to registry
- name: Push images to quay
uses: redhat-actions/push-to-registry@v2.8
with:
image: ramalama/ramalama

12
.gitignore vendored
View File

@ -10,8 +10,14 @@ ramalama/*.patch
dist
.#*
venv/
*.container
*.image
*.volume
/*.container
/*.image
/*.volume
__pycache__/
.aider*
.coverage
coverage.*
htmlcov/
.idea/
.hypothesis/
uv.lock

View File

@ -6,10 +6,10 @@
set -exo pipefail
# Get Version from HEAD
VERSION=$(awk -F'[""]' '/version=/ {print $(NF-1)}' setup.py)
# Extract version from pyproject.toml instead of setup.py
VERSION=$(awk -F'[""]' ' /^\s*version\s*/ {print $(NF-1)}' pyproject.toml )
SPEC_FILE=rpm/python-ramalama.spec
SPEC_FILE=rpm/ramalama.spec
# RPM Spec modifications

View File

@ -7,11 +7,11 @@ upstream_tag_template: v{version}
packages:
ramalama-fedora:
pkg_tool: fedpkg
downstream_package_name: python-ramalama
specfile_path: rpm/python-ramalama.spec
downstream_package_name: ramalama
specfile_path: rpm/ramalama.spec
ramalama-centos:
downstream_package_name: python-ramalama
specfile_path: rpm/python-ramalama.spec
downstream_package_name: ramalama
specfile_path: rpm/ramalama.spec
srpm_build_deps:
- make
@ -26,8 +26,7 @@ jobs:
packages: [ramalama-fedora]
enable_net: true
targets: &fedora_copr_targets
- fedora-development
- fedora-latest-stable
- fedora-all
osh_diff_scan_after_copr_build: false
# Copr builds for CentOS Stream
@ -52,12 +51,27 @@ jobs:
trigger: pull_request
packages: [ramalama-fedora]
targets: *fedora_copr_targets
tmt_plan: "/plans/rpm"
identifier: "rpm-fedora"
- job: tests
trigger: pull_request
skip_build: true
packages: [ramalama-fedora]
targets:
# FIXME: Validate test breaks on Fedora 41
- fedora-development
- fedora-latest-stable
tmt_plan: "/plans/no-rpm"
identifier: "no-rpm-fedora"
# Tests for CentOS Stream
- job: tests
trigger: pull_request
packages: [ramalama-centos]
targets: *centos_copr_targets
tmt_plan: "/plans/rpm"
identifier: "rpm-centos"
- job: propose_downstream
trigger: release
@ -65,7 +79,7 @@ jobs:
dist_git_branches: &fedora_targets
- fedora-all
- epel10
- epel9
- epel10.0
- job: koji_build
trigger: commit
@ -78,4 +92,4 @@ jobs:
dist_git_branches:
- fedora-branched # rawhide updates are created automatically
- epel10
- epel9
- epel10.0

37
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,37 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- id: check-toml
- id: check-added-large-files
- id: check-merge-conflict
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- repo: https://github.com/pycqa/flake8
rev: 7.3.0
hooks:
- id: flake8
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
args: ["-w"]
- repo: https://github.com/psf/black
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 6.0.1
hooks:
- id: isort
- repo: local
hooks:
- id: run-unit-tests
name: run unit tests
entry: make unit-tests
language: system
pass_filenames: false

View File

@ -0,0 +1,48 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: asahi-llama-server
pipelines.appstudio.openshift.io/type: build
name: asahi-llama-server-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/asahi-llama-server:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-m2xlarge/amd64
- linux-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/asahi:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/asahi:on-pr-{{revision}}
- ENTRYPOINT=/usr/bin/llama-server.sh
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,45 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: asahi-llama-server
pipelines.appstudio.openshift.io/type: build
name: asahi-llama-server-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/asahi-llama-server:{{revision}}
- name: build-platforms
value:
- linux-m2xlarge/amd64
- linux-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/asahi:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/asahi:{{revision}}
- ENTRYPOINT=/usr/bin/llama-server.sh
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,48 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: asahi-rag
pipelines.appstudio.openshift.io/type: build
name: asahi-rag-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/asahi-rag:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-d160-m2xlarge/amd64
- linux-d160-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.rag
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/asahi:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/asahi:on-pr-{{revision}}
- GPU=cpu
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,45 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: asahi-rag
pipelines.appstudio.openshift.io/type: build
name: asahi-rag-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/asahi-rag:{{revision}}
- name: build-platforms
value:
- linux-d160-m2xlarge/amd64
- linux-d160-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.rag
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/asahi:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/asahi:{{revision}}
- GPU=cpu
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,48 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: asahi-whisper-server
pipelines.appstudio.openshift.io/type: build
name: asahi-whisper-server-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/asahi-whisper-server:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-m2xlarge/amd64
- linux-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/asahi:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/asahi:on-pr-{{revision}}
- ENTRYPOINT=/usr/bin/whisper-server.sh
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,45 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: asahi-whisper-server
pipelines.appstudio.openshift.io/type: build
name: asahi-whisper-server-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/asahi-whisper-server:{{revision}}
- name: build-platforms
value:
- linux-m2xlarge/amd64
- linux-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/asahi:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/asahi:{{revision}}
- ENTRYPOINT=/usr/bin/whisper-server.sh
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,42 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: asahi
pipelines.appstudio.openshift.io/type: build
name: asahi-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/asahi:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-c4xlarge/amd64
- linux-c4xlarge/arm64
- name: dockerfile
value: container-images/asahi/Containerfile
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,39 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: asahi
pipelines.appstudio.openshift.io/type: build
name: asahi-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/asahi:{{revision}}
- name: build-platforms
value:
- linux-c4xlarge/amd64
- linux-c4xlarge/arm64
- name: dockerfile
value: container-images/asahi/Containerfile
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,42 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: bats
pipelines.appstudio.openshift.io/type: build
name: bats-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/bats:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-c4xlarge/amd64
- linux-c4xlarge/arm64
- name: dockerfile
value: container-images/bats/Containerfile
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,39 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: bats
pipelines.appstudio.openshift.io/type: build
name: bats-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/bats:{{revision}}
- name: build-platforms
value:
- linux-c4xlarge/amd64
- linux-c4xlarge/arm64
- name: dockerfile
value: container-images/bats/Containerfile
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,48 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: cann-llama-server
pipelines.appstudio.openshift.io/type: build
name: cann-llama-server-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cann-llama-server:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-m2xlarge/amd64
- linux-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cann:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/cann:on-pr-{{revision}}
- ENTRYPOINT=/usr/bin/llama-server.sh
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,45 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: cann-llama-server
pipelines.appstudio.openshift.io/type: build
name: cann-llama-server-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cann-llama-server:{{revision}}
- name: build-platforms
value:
- linux-m2xlarge/amd64
- linux-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cann:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/cann:{{revision}}
- ENTRYPOINT=/usr/bin/llama-server.sh
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,48 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: cann-rag
pipelines.appstudio.openshift.io/type: build
name: cann-rag-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cann-rag:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-d160-m2xlarge/amd64
- linux-d160-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.rag
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cann:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/cann:on-pr-{{revision}}
- GPU=cpu
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,45 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: cann-rag
pipelines.appstudio.openshift.io/type: build
name: cann-rag-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cann-rag:{{revision}}
- name: build-platforms
value:
- linux-d160-m2xlarge/amd64
- linux-d160-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.rag
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cann:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/cann:{{revision}}
- GPU=cpu
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,48 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: cann-whisper-server
pipelines.appstudio.openshift.io/type: build
name: cann-whisper-server-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cann-whisper-server:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-m2xlarge/amd64
- linux-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cann:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/cann:on-pr-{{revision}}
- ENTRYPOINT=/usr/bin/whisper-server.sh
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,45 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: cann-whisper-server
pipelines.appstudio.openshift.io/type: build
name: cann-whisper-server-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cann-whisper-server:{{revision}}
- name: build-platforms
value:
- linux-m2xlarge/amd64
- linux-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cann:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/cann:{{revision}}
- ENTRYPOINT=/usr/bin/whisper-server.sh
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,42 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: cann
pipelines.appstudio.openshift.io/type: build
name: cann-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cann:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-c4xlarge/amd64
- linux-c4xlarge/arm64
- name: dockerfile
value: container-images/cann/Containerfile
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,39 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: cann
pipelines.appstudio.openshift.io/type: build
name: cann-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cann:{{revision}}
- name: build-platforms
value:
- linux-c4xlarge/amd64
- linux-c4xlarge/arm64
- name: dockerfile
value: container-images/cann/Containerfile
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,48 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: cuda-llama-server
pipelines.appstudio.openshift.io/type: build
name: cuda-llama-server-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cuda-llama-server:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-m2xlarge/amd64
- linux-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cuda:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/cuda:on-pr-{{revision}}
- ENTRYPOINT=/usr/bin/llama-server.sh
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,45 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: cuda-llama-server
pipelines.appstudio.openshift.io/type: build
name: cuda-llama-server-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cuda-llama-server:{{revision}}
- name: build-platforms
value:
- linux-m2xlarge/amd64
- linux-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cuda:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/cuda:{{revision}}
- ENTRYPOINT=/usr/bin/llama-server.sh
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,48 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: cuda-rag
pipelines.appstudio.openshift.io/type: build
name: cuda-rag-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cuda-rag:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-d160-m2xlarge/amd64
- linux-d160-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.rag
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cuda:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/cuda:on-pr-{{revision}}
- GPU=cuda
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,45 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: cuda-rag
pipelines.appstudio.openshift.io/type: build
name: cuda-rag-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cuda-rag:{{revision}}
- name: build-platforms
value:
- linux-d160-m2xlarge/amd64
- linux-d160-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.rag
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cuda:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/cuda:{{revision}}
- GPU=cuda
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,48 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: cuda-whisper-server
pipelines.appstudio.openshift.io/type: build
name: cuda-whisper-server-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cuda-whisper-server:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-m2xlarge/amd64
- linux-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cuda:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/cuda:on-pr-{{revision}}
- ENTRYPOINT=/usr/bin/whisper-server.sh
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,45 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: cuda-whisper-server
pipelines.appstudio.openshift.io/type: build
name: cuda-whisper-server-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cuda-whisper-server:{{revision}}
- name: build-platforms
value:
- linux-m2xlarge/amd64
- linux-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cuda:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/cuda:{{revision}}
- ENTRYPOINT=/usr/bin/whisper-server.sh
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,42 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: cuda
pipelines.appstudio.openshift.io/type: build
name: cuda-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cuda:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-c4xlarge/amd64
- linux-c4xlarge/arm64
- name: dockerfile
value: container-images/cuda/Containerfile
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,39 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: cuda
pipelines.appstudio.openshift.io/type: build
name: cuda-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/cuda:{{revision}}
- name: build-platforms
value:
- linux-c4xlarge/amd64
- linux-c4xlarge/arm64
- name: dockerfile
value: container-images/cuda/Containerfile
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,66 @@
kind: Pipeline
apiVersion: tekton.dev/v1
metadata:
name: bats-integration
spec:
description: |
Test the newly-built ramalama image and layered images on all supported architectures.
params:
- name: SNAPSHOT
description: >-
Information about the components included in the current snapshot under test.
- name: platforms
description: VM platforms on which to run test commands
type: array
default:
- linux-c4xlarge/amd64
- linux-c4xlarge/arm64
- name: commands
description: Test commands to run
type: array
default:
- make bats
- name: git-url
description: URL of the Git repository containing pipeline and task definitions
default: https://github.com/containers/ramalama.git
- name: git-revision
description: Revision of the Git repository containing pipeline and task definitions
default: main
tasks:
- name: init
params:
- name: SNAPSHOT
value: $(params.SNAPSHOT)
taskRef:
resolver: git
params:
- name: url
value: $(params.git-url)
- name: revision
value: $(params.git-revision)
- name: pathInRepo
value: .tekton/integration/tasks/init-snapshot.yaml
- name: test
matrix:
params:
- name: PLATFORM
value:
- $(params.platforms)
- name: cmd
value:
- $(params.commands)
params:
- name: image
value: $(tasks.init.results.bats-image)
- name: envs
value:
- RAMALAMA_IMAGE=$(tasks.init.results.ramalama-image)
taskRef:
resolver: git
params:
- name: url
value: $(params.git-url)
- name: revision
value: $(params.git-revision)
- name: pathInRepo
value: .tekton/integration/tasks/test-vm-cmd.yaml

View File

@ -0,0 +1,55 @@
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: init-snapshot
spec:
description: Extract information from the SNAPSHOT and make it available as Tekton results
params:
- name: SNAPSHOT
description: >-
Information about the components included in the current snapshot under test.
results:
- name: event-type
description: The type of event that triggered the pipeline
- name: bats-image
description: URI of the bats image included in the snapshot
- name: ramalama-image
description: URI of the ramalama image included in the snapshot
- name: TEST_OUTPUT
description: Test result in json format
steps:
- name: process
image: registry.access.redhat.com/ubi10/ubi:latest
env:
- name: SNAPSHOT
value: $(params.SNAPSHOT)
- name: EVENT_TYPE
valueFrom:
fieldRef:
fieldPath: metadata.labels['pac.test.appstudio.openshift.io/event-type']
- name: RESULTS_EVENT_TYPE_PATH
value: $(results.event-type.path)
- name: RESULTS_BATS_IMAGE_PATH
value: $(results.bats-image.path)
- name: RESULTS_RAMALAMA_IMAGE_PATH
value: $(results.ramalama-image.path)
- name: RESULTS_TEST_OUTPUT_PATH
value: $(results.TEST_OUTPUT.path)
script: |
#!/bin/bash -ex
dnf -y install jq
echo -n "$EVENT_TYPE" | tee "$RESULTS_EVENT_TYPE_PATH"
echo
component_image() {
TAGSEP=":"
if [ "$EVENT_TYPE" == "pull_request" ]; then
TAGSEP+="on-pr-"
fi
jq -j --arg name "$1" --arg tagsep "$TAGSEP" '.components[] | select(.name == $name) | [(.containerImage | split("@")[0]), .source.git.revision] | join($tagsep)' <<< "$SNAPSHOT"
}
component_image bats | tee "$RESULTS_BATS_IMAGE_PATH"
echo
component_image ramalama | tee "$RESULTS_RAMALAMA_IMAGE_PATH"
echo
jq -jnc '{result: "SUCCESS", timestamp: now | todateiso8601, failures: 0, successes: 1, warnings: 0}' | tee "$RESULTS_TEST_OUTPUT_PATH"
echo

View File

@ -0,0 +1,118 @@
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: test-vm-cmd
spec:
description: Run a command in a test VM
params:
- name: PLATFORM
description: The platform of the VM to provision
- name: image
description: The image to use when setting up the test environment
- name: cmd
description: The command to run
- name: envs
description: List of environment variables (NAME=VALUE) to be set in the test environment
type: array
default: []
results:
- name: TEST_OUTPUT
description: Test result in json format
volumes:
- name: workdir
emptyDir: {}
- name: ssh
secret:
secretName: multi-platform-ssh-$(context.taskRun.name)
steps:
- name: run-in-vm
image: registry.access.redhat.com/ubi10/ubi:latest
volumeMounts:
- mountPath: /var/workdir
name: workdir
- mountPath: /ssh
name: ssh
workingDir: /var/workdir
env:
- name: TEST_IMAGE
value: $(params.image)
- name: TEST_CMD
value: $(params.cmd)
- name: RESULTS_TEST_OUTPUT_PATH
value: $(results.TEST_OUTPUT.path)
args:
- $(params.envs[*])
script: |
#!/bin/bash -ex
log() {
echo "[$(date -uIns)]" $*
}
log Install packages
dnf -y install openssh-clients rsync jq
log Prepare connection
if [ -e "/ssh/error" ]; then
log Error provisioning VM
cat /ssh/error
exit 1
fi
export SSH_HOST=$(cat /ssh/host)
mkdir -p ~/.ssh
if [ "$SSH_HOST" == "localhost" ] ; then
IS_LOCALHOST=true
log Localhost detected, running build in cluster
elif [ -s "/ssh/otp" ]; then
log Fetching OTP token
curl --cacert /ssh/otp-ca -d @/ssh/otp $(cat /ssh/otp-server) > ~/.ssh/id_rsa
echo >> ~/.ssh/id_rsa
chmod 0400 ~/.ssh/id_rsa
elif [ -s "/ssh/id_rsa" ]; then
log Copying ssh key
cp /ssh/id_rsa ~/.ssh
chmod 0400 ~/.ssh/id_rsa
else
log No authentication mechanism found
exit 1
fi
mkdir -p scripts
PODMAN_ENV=()
while [ $# -ne 0 ]; do
PODMAN_ENV+=("-e" "$1")
shift
done
cat > scripts/test.sh <<SCRIPTEOF
#!/bin/bash -ex
podman run \
--userns=keep-id \
--security-opt label=disable \
--security-opt unmask=/proc/* \
--device /dev/net/tun \
--device /dev/fuse \
${PODMAN_ENV[*]} \
$TEST_IMAGE $TEST_CMD
SCRIPTEOF
chmod +x scripts/test.sh
if ! [[ $IS_LOCALHOST ]]; then
log VM exec
export BUILD_DIR=$(cat /ssh/user-dir)
export SSH_ARGS="-o StrictHostKeyChecking=no -o ServerAliveInterval=60 -o ServerAliveCountMax=10"
# ssh once before rsync to retrieve the host key
ssh $SSH_ARGS "$SSH_HOST" "uname -a"
rsync -ra scripts "$SSH_HOST:$BUILD_DIR"
ssh $SSH_ARGS "$SSH_HOST" "$BUILD_DIR/scripts/test.sh"
log End VM exec
else
log Local exec
scripts/test.sh
log End local exec
fi
jq -jnc '{result: "SUCCESS", timestamp: now | todateiso8601, failures: 0, successes: 1, warnings: 0}' | tee "$RESULTS_TEST_OUTPUT_PATH"
echo

View File

@ -0,0 +1,47 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: intel-gpu-llama-server
pipelines.appstudio.openshift.io/type: build
name: intel-gpu-llama-server-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/intel-gpu-llama-server:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/intel-gpu:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/intel-gpu:on-pr-{{revision}}
- ENTRYPOINT=/usr/bin/llama-server.sh
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,44 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: intel-gpu-llama-server
pipelines.appstudio.openshift.io/type: build
name: intel-gpu-llama-server-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/intel-gpu-llama-server:{{revision}}
- name: build-platforms
value:
- linux-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/intel-gpu:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/intel-gpu:{{revision}}
- ENTRYPOINT=/usr/bin/llama-server.sh
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,47 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: intel-gpu-rag
pipelines.appstudio.openshift.io/type: build
name: intel-gpu-rag-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/intel-gpu-rag:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-d160-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.rag
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/intel-gpu:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/intel-gpu:on-pr-{{revision}}
- GPU=cpu
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,44 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: intel-gpu-rag
pipelines.appstudio.openshift.io/type: build
name: intel-gpu-rag-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/intel-gpu-rag:{{revision}}
- name: build-platforms
value:
- linux-d160-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.rag
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/intel-gpu:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/intel-gpu:{{revision}}
- GPU=cpu
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,47 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: intel-gpu-whisper-server
pipelines.appstudio.openshift.io/type: build
name: intel-gpu-whisper-server-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/intel-gpu-whisper-server:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/intel-gpu:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/intel-gpu:on-pr-{{revision}}
- ENTRYPOINT=/usr/bin/whisper-server.sh
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,44 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: intel-gpu-whisper-server
pipelines.appstudio.openshift.io/type: build
name: intel-gpu-whisper-server-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/intel-gpu-whisper-server:{{revision}}
- name: build-platforms
value:
- linux-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/intel-gpu:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/intel-gpu:{{revision}}
- ENTRYPOINT=/usr/bin/whisper-server.sh
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,41 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: intel-gpu
pipelines.appstudio.openshift.io/type: build
name: intel-gpu-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/intel-gpu:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-c4xlarge/amd64
- name: dockerfile
value: container-images/intel-gpu/Containerfile
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,38 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: intel-gpu
pipelines.appstudio.openshift.io/type: build
name: intel-gpu-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/intel-gpu:{{revision}}
- name: build-platforms
value:
- linux-c4xlarge/amd64
- name: dockerfile
value: container-images/intel-gpu/Containerfile
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,42 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: llama-stack
pipelines.appstudio.openshift.io/type: build
name: llama-stack-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/llama-stack:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-c4xlarge/amd64
- linux-c4xlarge/arm64
- name: dockerfile
value: container-images/llama-stack/Containerfile
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,39 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: llama-stack
pipelines.appstudio.openshift.io/type: build
name: llama-stack-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/llama-stack:{{revision}}
- name: build-platforms
value:
- linux-c4xlarge/amd64
- linux-c4xlarge/arm64
- name: dockerfile
value: container-images/llama-stack/Containerfile
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,47 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: musa-llama-server
pipelines.appstudio.openshift.io/type: build
name: musa-llama-server-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/musa-llama-server:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/musa:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/musa:on-pr-{{revision}}
- ENTRYPOINT=/usr/bin/llama-server.sh
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,44 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: musa-llama-server
pipelines.appstudio.openshift.io/type: build
name: musa-llama-server-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/musa-llama-server:{{revision}}
- name: build-platforms
value:
- linux-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/musa:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/musa:{{revision}}
- ENTRYPOINT=/usr/bin/llama-server.sh
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,47 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: musa-rag
pipelines.appstudio.openshift.io/type: build
name: musa-rag-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/musa-rag:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-d160-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.rag
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/musa:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/musa:on-pr-{{revision}}
- GPU=musa
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,44 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: musa-rag
pipelines.appstudio.openshift.io/type: build
name: musa-rag-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/musa-rag:{{revision}}
- name: build-platforms
value:
- linux-d160-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.rag
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/musa:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/musa:{{revision}}
- GPU=musa
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,47 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: musa-whisper-server
pipelines.appstudio.openshift.io/type: build
name: musa-whisper-server-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/musa-whisper-server:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/musa:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/musa:on-pr-{{revision}}
- ENTRYPOINT=/usr/bin/whisper-server.sh
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,44 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: musa-whisper-server
pipelines.appstudio.openshift.io/type: build
name: musa-whisper-server-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/musa-whisper-server:{{revision}}
- name: build-platforms
value:
- linux-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/musa:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/musa:{{revision}}
- ENTRYPOINT=/usr/bin/whisper-server.sh
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,41 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: musa
pipelines.appstudio.openshift.io/type: build
name: musa-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/musa:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-c4xlarge/amd64
- name: dockerfile
value: container-images/musa/Containerfile
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,38 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: musa
pipelines.appstudio.openshift.io/type: build
name: musa-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/musa:{{revision}}
- name: build-platforms
value:
- linux-c4xlarge/amd64
- name: dockerfile
value: container-images/musa/Containerfile
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,41 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: openvino
pipelines.appstudio.openshift.io/type: build
name: openvino-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/openvino:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-c4xlarge/amd64
- name: dockerfile
value: container-images/openvino/Containerfile
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,38 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: openvino
pipelines.appstudio.openshift.io/type: build
name: openvino-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/openvino:{{revision}}
- name: build-platforms
value:
- linux-c4xlarge/amd64
- name: dockerfile
value: container-images/openvino/Containerfile
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,640 @@
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: pull-request-pipeline
labels:
appstudio.openshift.io/application: ramalama
spec:
description: |
Pipeline for building RamaLama images when PRs are submitted.
Based on the [docker-build-multi-platform-oci-ta](https://github.com/konflux-ci/build-definitions/tree/main/pipelines/docker-build-multi-platform-oci-ta) pipeline from [Konflux](https://konflux-ci.dev/).
params:
- description: Source Repository URL
name: git-url
type: string
- default: ""
description: Revision of the Source Repository
name: revision
type: string
- description: Fully Qualified Output Image
name: output-image
type: string
- default: .
description: Path to the source code of an application's component from where to build image.
name: path-context
type: string
- default: Dockerfile
description: Path to the Dockerfile inside the context specified by parameter path-context
name: dockerfile
type: string
- default: "false"
description: Force rebuild image
name: rebuild
type: string
- default: "true"
description: Skip checks against built image
name: skip-checks
type: string
- default: "false"
description: Execute the build with network isolation
name: hermetic
type: string
- default: ""
description: Build dependencies to be prefetched by Cachi2
name: prefetch-input
type: string
- default: ""
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
name: image-expires-after
- default: "false"
description: Build a source image.
name: build-source-image
type: string
- default: "true"
description: Add built image into an OCI image index
name: build-image-index
type: string
- default: []
description: Array of --build-arg values ("arg=value" strings) for buildah
name: build-args
type: array
- default: ""
description: Path to a file with build arguments for buildah, see https://www.mankier.com/1/buildah-build#--build-arg-file
name: build-args-file
type: string
- default: "false"
description: Whether to enable privileged mode, should be used only with remote VMs
name: privileged-nested
type: string
- default:
- linux-c4xlarge/amd64
description: List of platforms to build the container images on. The available set of values is determined by the configuration of the multi-platform-controller.
name: build-platforms
type: array
- default: ""
description: The parent image of the image being built.
name: parent-image
- default: ""
description: The image to use for running tests.
name: test-image
- default: []
description: List of environment variables (NAME=VALUE) to be set in the test environment.
name: test-envs
type: array
- default:
- echo "No tests defined"
description: List of test commands to run after the image is built.
name: test-commands
type: array
results:
- description: ""
name: IMAGE_URL
value: $(tasks.build-image-index.results.IMAGE_URL)
- description: ""
name: IMAGE_DIGEST
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- description: ""
name: CHAINS-GIT_URL
value: $(tasks.clone-repository.results.url)
- description: ""
name: CHAINS-GIT_COMMIT
value: $(tasks.clone-repository.results.commit)
tasks:
- name: init
params:
- name: image-url
value: $(params.output-image)
- name: rebuild
value: $(params.rebuild)
- name: skip-checks
value: $(params.skip-checks)
taskRef:
params:
- name: name
value: init
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-init:0.2@sha256:1d8221c84f91b923d89de50bf16481ea729e3b68ea04a9a7cbe8485ddbb27ee6
- name: kind
value: task
resolver: bundles
- name: clone-repository
params:
- name: url
value: $(params.git-url)
- name: revision
value: $(params.revision)
- name: ociStorage
value: $(params.output-image).git
- name: ociArtifactExpiresAfter
value: $(params.image-expires-after)
runAfter:
- init
taskRef:
params:
- name: name
value: git-clone-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-git-clone-oci-ta:0.1@sha256:d35e5d501cb5f5f88369511f76249857cb5ac30250e1dcf086939321964ff6b9
- name: kind
value: task
resolver: bundles
when:
- input: $(tasks.init.results.build)
operator: in
values:
- "true"
workspaces:
- name: basic-auth
workspace: git-auth
- name: prefetch-dependencies
params:
- name: input
value: $(params.prefetch-input)
- name: SOURCE_ARTIFACT
value: $(tasks.clone-repository.results.SOURCE_ARTIFACT)
- name: ociStorage
value: $(params.output-image).prefetch
- name: ociArtifactExpiresAfter
value: $(params.image-expires-after)
runAfter:
- clone-repository
taskRef:
params:
- name: name
value: prefetch-dependencies-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-prefetch-dependencies-oci-ta:0.2@sha256:092491ac0f6e1009d10c58a1319d1029371bf637cc1293cceba53c6da5314ed1
- name: kind
value: task
resolver: bundles
workspaces:
- name: git-basic-auth
workspace: git-auth
- name: netrc
workspace: netrc
- name: wait-for-parent-image
params:
- name: ref
value: $(params.parent-image)
taskRef:
name: wait-for-image
when:
- input: $(params.parent-image)
operator: notin
values:
- ""
- matrix:
params:
- name: PLATFORM
value:
- $(params.build-platforms)
name: build-images
params:
- name: IMAGE
value: $(params.output-image)
- name: DOCKERFILE
value: $(params.dockerfile)
- name: CONTEXT
value: $(params.path-context)
- name: HERMETIC
value: $(params.hermetic)
- name: PREFETCH_INPUT
value: $(params.prefetch-input)
- name: IMAGE_EXPIRES_AFTER
value: $(params.image-expires-after)
- name: COMMIT_SHA
value: $(tasks.clone-repository.results.commit)
- name: BUILD_ARGS
value:
- $(params.build-args[*])
- name: BUILD_ARGS_FILE
value: $(params.build-args-file)
- name: PRIVILEGED_NESTED
value: $(params.privileged-nested)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
- name: IMAGE_APPEND_PLATFORM
value: "true"
runAfter:
- wait-for-parent-image
- prefetch-dependencies
taskRef:
params:
- name: name
value: buildah-remote-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-buildah-remote-oci-ta:0.4@sha256:9e866d4d0489a6ab84ae263db416c9f86d2d6117ef4444f495a0e97388ae3ac0
- name: kind
value: task
resolver: bundles
when:
- input: $(tasks.init.results.build)
operator: in
values:
- "true"
- name: build-image-index
params:
- name: IMAGE
value: $(params.output-image)
- name: COMMIT_SHA
value: $(tasks.clone-repository.results.commit)
- name: IMAGE_EXPIRES_AFTER
value: $(params.image-expires-after)
- name: ALWAYS_BUILD_INDEX
value: $(params.build-image-index)
- name: IMAGES
value:
- $(tasks.build-images.results.IMAGE_REF[*])
runAfter:
- build-images
taskRef:
params:
- name: name
value: build-image-index
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-build-image-index:0.1@sha256:3499772af90aad0d3935629be6d37dd9292195fb629e6f43ec839c7f545a0faa
- name: kind
value: task
resolver: bundles
when:
- input: $(tasks.init.results.build)
operator: in
values:
- "true"
- name: wait-for-test-image
params:
- name: ref
value: $(params.test-image)
runAfter:
- build-image-index
taskRef:
name: wait-for-image
when:
- input: $(params.test-image)
operator: notin
values:
- ""
- name: run-tests
matrix:
params:
- name: cmd
value:
- $(params.test-commands)
params:
- name: image
value: $(params.test-image)@$(tasks.wait-for-test-image.results.digest)
- name: envs
value:
- $(params.test-envs[*])
runAfter:
- wait-for-test-image
taskRef:
name: test-cmd
when:
- input: $(params.test-image)
operator: notin
values:
- ""
- name: build-source-image
params:
- name: BINARY_IMAGE
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
- name: BINARY_IMAGE_DIGEST
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: source-build-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-source-build-oci-ta:0.3@sha256:b1eb49583b41872b27356fee20d5f0eb6ff7f5cdeacde7ffb39655f031104728
- name: kind
value: task
resolver: bundles
when:
- input: $(tasks.init.results.build)
operator: in
values:
- "true"
- input: $(params.build-source-image)
operator: in
values:
- "true"
- name: deprecated-base-image-check
params:
- name: IMAGE_URL
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: IMAGE_DIGEST
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: deprecated-image-check
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-deprecated-image-check:0.5@sha256:3c8b81fa868e27c6266e7660a4bfb4c822846dcf4304606e71e20893b0d3e515
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: clair-scan
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: clair-scan
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-clair-scan:0.2@sha256:417f44117f8d87a4a62fea6589b5746612ac61640b454dbd88f74892380411f2
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: ecosystem-cert-preflight-checks
params:
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: ecosystem-cert-preflight-checks
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-ecosystem-cert-preflight-checks:0.2@sha256:f99d2bdb02f13223d494077a2cde31418d09369f33c02134a8e7e5fad2f61eda
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: sast-snyk-check
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: sast-snyk-check-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-sast-snyk-check-oci-ta:0.4@sha256:fe5e5ba3a72632cd505910de2eacd62c9d11ed570c325173188f8d568ac60771
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: clamav-scan
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: clamav-scan
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-clamav-scan:0.2@sha256:7749146f7e4fe530846f1b15c9366178ec9f44776ef1922a60d3e7e2b8c6426b
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: sast-coverity-check
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: IMAGE
value: $(params.output-image)
- name: DOCKERFILE
value: $(params.dockerfile)
- name: CONTEXT
value: $(params.path-context)
- name: HERMETIC
value: $(params.hermetic)
- name: PREFETCH_INPUT
value: $(params.prefetch-input)
- name: IMAGE_EXPIRES_AFTER
value: $(params.image-expires-after)
- name: COMMIT_SHA
value: $(tasks.clone-repository.results.commit)
- name: BUILD_ARGS
value:
- $(params.build-args[*])
- name: BUILD_ARGS_FILE
value: $(params.build-args-file)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
runAfter:
- coverity-availability-check
taskRef:
params:
- name: name
value: sast-coverity-check-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-sast-coverity-check-oci-ta:0.3@sha256:f9ca942208dc2e63b479384ccc56a611cc793397ecc837637b5b9f89c2ecbefe
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- input: $(tasks.coverity-availability-check.results.STATUS)
operator: in
values:
- success
- name: coverity-availability-check
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: coverity-availability-check
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-coverity-availability-check:0.2@sha256:db2b267dc15e4ed17f704ee91b8e9b38068e1a35b1018a328fdca621819d74c6
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: sast-shell-check
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: sast-shell-check-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-sast-shell-check-oci-ta:0.1@sha256:bf7bdde00b7212f730c1356672290af6f38d070da2c8a316987b5c32fd49e0b9
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: sast-unicode-check
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: sast-unicode-check-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-sast-unicode-check-oci-ta:0.3@sha256:a2bde66f6b4164620298c7d709b8f08515409404000fa1dc2260d2508b135651
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: apply-tags
params:
- name: IMAGE_URL
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: IMAGE_DIGEST
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: apply-tags
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-apply-tags:0.2@sha256:517a51e260c0b59654a9d7b842e1ab07d76bce15ca7ce9c8fd2489a19be6463d
- name: kind
value: task
resolver: bundles
- name: push-dockerfile
params:
- name: IMAGE
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: IMAGE_DIGEST
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: DOCKERFILE
value: $(params.dockerfile)
- name: CONTEXT
value: $(params.path-context)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: push-dockerfile-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-push-dockerfile-oci-ta:0.1@sha256:8c75c4a747e635e5f3e12266a3bb6e5d3132bf54e37eaa53d505f89897dd8eca
- name: kind
value: task
resolver: bundles
- name: rpms-signature-scan
params:
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: rpms-signature-scan
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-rpms-signature-scan:0.2@sha256:1b6c20ab3dbfb0972803d3ebcb2fa72642e59400c77bd66dfd82028bdd09e120
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
finally:
- name: show-sbom
params:
- name: IMAGE_URL
value: $(tasks.build-image-index.results.IMAGE_URL)
taskRef:
params:
- name: name
value: show-sbom
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-show-sbom:0.1@sha256:86c069cac0a669797e8049faa8aa4088e70ff7fcd579d5bdc37626a9e0488a05
- name: kind
value: task
resolver: bundles
workspaces:
- name: git-auth
optional: true
- name: netrc
optional: true

View File

@ -0,0 +1,640 @@
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: push-pipeline
labels:
appstudio.openshift.io/application: ramalama
spec:
description: |
Pipeline for building RamaLama images on push.
Based on the [docker-build-multi-platform-oci-ta](https://github.com/konflux-ci/build-definitions/tree/main/pipelines/docker-build-multi-platform-oci-ta) pipeline from [Konflux](https://konflux-ci.dev/).
params:
- description: Source Repository URL
name: git-url
type: string
- default: ""
description: Revision of the Source Repository
name: revision
type: string
- description: Fully Qualified Output Image
name: output-image
type: string
- default: .
description: Path to the source code of an application's component from where to build image.
name: path-context
type: string
- default: Dockerfile
description: Path to the Dockerfile inside the context specified by parameter path-context
name: dockerfile
type: string
- default: "false"
description: Force rebuild image
name: rebuild
type: string
- default: "false"
description: Skip checks against built image
name: skip-checks
type: string
- default: "false"
description: Execute the build with network isolation
name: hermetic
type: string
- default: ""
description: Build dependencies to be prefetched by Cachi2
name: prefetch-input
type: string
- default: ""
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
name: image-expires-after
- default: "false"
description: Build a source image.
name: build-source-image
type: string
- default: "true"
description: Add built image into an OCI image index
name: build-image-index
type: string
- default: []
description: Array of --build-arg values ("arg=value" strings) for buildah
name: build-args
type: array
- default: ""
description: Path to a file with build arguments for buildah, see https://www.mankier.com/1/buildah-build#--build-arg-file
name: build-args-file
type: string
- default: "false"
description: Whether to enable privileged mode, should be used only with remote VMs
name: privileged-nested
type: string
- default:
- linux-c4xlarge/amd64
description: List of platforms to build the container images on. The available set of values is determined by the configuration of the multi-platform-controller.
name: build-platforms
type: array
- default: ""
description: The parent image of the image being built.
name: parent-image
- default: ""
description: The image to use for running tests.
name: test-image
- default: []
description: List of environment variables (NAME=VALUE) to be set in the test environment.
name: test-envs
type: array
- default:
- echo "No tests defined"
description: List of test commands to run after the image is built.
name: test-commands
type: array
results:
- description: ""
name: IMAGE_URL
value: $(tasks.build-image-index.results.IMAGE_URL)
- description: ""
name: IMAGE_DIGEST
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- description: ""
name: CHAINS-GIT_URL
value: $(tasks.clone-repository.results.url)
- description: ""
name: CHAINS-GIT_COMMIT
value: $(tasks.clone-repository.results.commit)
tasks:
- name: init
params:
- name: image-url
value: $(params.output-image)
- name: rebuild
value: $(params.rebuild)
- name: skip-checks
value: $(params.skip-checks)
taskRef:
params:
- name: name
value: init
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-init:0.2@sha256:1d8221c84f91b923d89de50bf16481ea729e3b68ea04a9a7cbe8485ddbb27ee6
- name: kind
value: task
resolver: bundles
- name: clone-repository
params:
- name: url
value: $(params.git-url)
- name: revision
value: $(params.revision)
- name: ociStorage
value: $(params.output-image).git
- name: ociArtifactExpiresAfter
value: $(params.image-expires-after)
runAfter:
- init
taskRef:
params:
- name: name
value: git-clone-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-git-clone-oci-ta:0.1@sha256:d35e5d501cb5f5f88369511f76249857cb5ac30250e1dcf086939321964ff6b9
- name: kind
value: task
resolver: bundles
when:
- input: $(tasks.init.results.build)
operator: in
values:
- "true"
workspaces:
- name: basic-auth
workspace: git-auth
- name: prefetch-dependencies
params:
- name: input
value: $(params.prefetch-input)
- name: SOURCE_ARTIFACT
value: $(tasks.clone-repository.results.SOURCE_ARTIFACT)
- name: ociStorage
value: $(params.output-image).prefetch
- name: ociArtifactExpiresAfter
value: $(params.image-expires-after)
runAfter:
- clone-repository
taskRef:
params:
- name: name
value: prefetch-dependencies-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-prefetch-dependencies-oci-ta:0.2@sha256:092491ac0f6e1009d10c58a1319d1029371bf637cc1293cceba53c6da5314ed1
- name: kind
value: task
resolver: bundles
workspaces:
- name: git-basic-auth
workspace: git-auth
- name: netrc
workspace: netrc
- name: wait-for-parent-image
params:
- name: ref
value: $(params.parent-image)
taskRef:
name: wait-for-image
when:
- input: $(params.parent-image)
operator: notin
values:
- ""
- matrix:
params:
- name: PLATFORM
value:
- $(params.build-platforms)
name: build-images
params:
- name: IMAGE
value: $(params.output-image)
- name: DOCKERFILE
value: $(params.dockerfile)
- name: CONTEXT
value: $(params.path-context)
- name: HERMETIC
value: $(params.hermetic)
- name: PREFETCH_INPUT
value: $(params.prefetch-input)
- name: IMAGE_EXPIRES_AFTER
value: $(params.image-expires-after)
- name: COMMIT_SHA
value: $(tasks.clone-repository.results.commit)
- name: BUILD_ARGS
value:
- $(params.build-args[*])
- name: BUILD_ARGS_FILE
value: $(params.build-args-file)
- name: PRIVILEGED_NESTED
value: $(params.privileged-nested)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
- name: IMAGE_APPEND_PLATFORM
value: "true"
runAfter:
- wait-for-parent-image
- prefetch-dependencies
taskRef:
params:
- name: name
value: buildah-remote-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-buildah-remote-oci-ta:0.4@sha256:9e866d4d0489a6ab84ae263db416c9f86d2d6117ef4444f495a0e97388ae3ac0
- name: kind
value: task
resolver: bundles
when:
- input: $(tasks.init.results.build)
operator: in
values:
- "true"
- name: build-image-index
params:
- name: IMAGE
value: $(params.output-image)
- name: COMMIT_SHA
value: $(tasks.clone-repository.results.commit)
- name: IMAGE_EXPIRES_AFTER
value: $(params.image-expires-after)
- name: ALWAYS_BUILD_INDEX
value: $(params.build-image-index)
- name: IMAGES
value:
- $(tasks.build-images.results.IMAGE_REF[*])
runAfter:
- build-images
taskRef:
params:
- name: name
value: build-image-index
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-build-image-index:0.1@sha256:3499772af90aad0d3935629be6d37dd9292195fb629e6f43ec839c7f545a0faa
- name: kind
value: task
resolver: bundles
when:
- input: $(tasks.init.results.build)
operator: in
values:
- "true"
- name: wait-for-test-image
params:
- name: ref
value: $(params.test-image)
runAfter:
- build-image-index
taskRef:
name: wait-for-image
when:
- input: $(params.test-image)
operator: notin
values:
- ""
- name: run-tests
matrix:
params:
- name: cmd
value:
- $(params.test-commands)
params:
- name: image
value: $(params.test-image)@$(tasks.wait-for-test-image.results.digest)
- name: envs
value:
- $(params.test-envs[*])
runAfter:
- wait-for-test-image
taskRef:
name: test-cmd
when:
- input: $(params.test-image)
operator: notin
values:
- ""
- name: build-source-image
params:
- name: BINARY_IMAGE
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
- name: BINARY_IMAGE_DIGEST
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: source-build-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-source-build-oci-ta:0.3@sha256:b1eb49583b41872b27356fee20d5f0eb6ff7f5cdeacde7ffb39655f031104728
- name: kind
value: task
resolver: bundles
when:
- input: $(tasks.init.results.build)
operator: in
values:
- "true"
- input: $(params.build-source-image)
operator: in
values:
- "true"
- name: deprecated-base-image-check
params:
- name: IMAGE_URL
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: IMAGE_DIGEST
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: deprecated-image-check
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-deprecated-image-check:0.5@sha256:3c8b81fa868e27c6266e7660a4bfb4c822846dcf4304606e71e20893b0d3e515
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: clair-scan
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: clair-scan
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-clair-scan:0.2@sha256:417f44117f8d87a4a62fea6589b5746612ac61640b454dbd88f74892380411f2
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: ecosystem-cert-preflight-checks
params:
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: ecosystem-cert-preflight-checks
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-ecosystem-cert-preflight-checks:0.2@sha256:f99d2bdb02f13223d494077a2cde31418d09369f33c02134a8e7e5fad2f61eda
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: sast-snyk-check
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: sast-snyk-check-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-sast-snyk-check-oci-ta:0.4@sha256:fe5e5ba3a72632cd505910de2eacd62c9d11ed570c325173188f8d568ac60771
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: clamav-scan
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: clamav-scan
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-clamav-scan:0.2@sha256:7749146f7e4fe530846f1b15c9366178ec9f44776ef1922a60d3e7e2b8c6426b
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: sast-coverity-check
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: IMAGE
value: $(params.output-image)
- name: DOCKERFILE
value: $(params.dockerfile)
- name: CONTEXT
value: $(params.path-context)
- name: HERMETIC
value: $(params.hermetic)
- name: PREFETCH_INPUT
value: $(params.prefetch-input)
- name: IMAGE_EXPIRES_AFTER
value: $(params.image-expires-after)
- name: COMMIT_SHA
value: $(tasks.clone-repository.results.commit)
- name: BUILD_ARGS
value:
- $(params.build-args[*])
- name: BUILD_ARGS_FILE
value: $(params.build-args-file)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
runAfter:
- coverity-availability-check
taskRef:
params:
- name: name
value: sast-coverity-check-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-sast-coverity-check-oci-ta:0.3@sha256:f9ca942208dc2e63b479384ccc56a611cc793397ecc837637b5b9f89c2ecbefe
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- input: $(tasks.coverity-availability-check.results.STATUS)
operator: in
values:
- success
- name: coverity-availability-check
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: coverity-availability-check
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-coverity-availability-check:0.2@sha256:db2b267dc15e4ed17f704ee91b8e9b38068e1a35b1018a328fdca621819d74c6
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: sast-shell-check
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: sast-shell-check-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-sast-shell-check-oci-ta:0.1@sha256:bf7bdde00b7212f730c1356672290af6f38d070da2c8a316987b5c32fd49e0b9
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: sast-unicode-check
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: sast-unicode-check-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-sast-unicode-check-oci-ta:0.3@sha256:a2bde66f6b4164620298c7d709b8f08515409404000fa1dc2260d2508b135651
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: apply-tags
params:
- name: IMAGE_URL
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: IMAGE_DIGEST
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: apply-tags
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-apply-tags:0.2@sha256:517a51e260c0b59654a9d7b842e1ab07d76bce15ca7ce9c8fd2489a19be6463d
- name: kind
value: task
resolver: bundles
- name: push-dockerfile
params:
- name: IMAGE
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: IMAGE_DIGEST
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: DOCKERFILE
value: $(params.dockerfile)
- name: CONTEXT
value: $(params.path-context)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: push-dockerfile-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-push-dockerfile-oci-ta:0.1@sha256:8c75c4a747e635e5f3e12266a3bb6e5d3132bf54e37eaa53d505f89897dd8eca
- name: kind
value: task
resolver: bundles
- name: rpms-signature-scan
params:
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: rpms-signature-scan
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-rpms-signature-scan:0.2@sha256:1b6c20ab3dbfb0972803d3ebcb2fa72642e59400c77bd66dfd82028bdd09e120
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
finally:
- name: show-sbom
params:
- name: IMAGE_URL
value: $(tasks.build-image-index.results.IMAGE_URL)
taskRef:
params:
- name: name
value: show-sbom
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-show-sbom:0.1@sha256:86c069cac0a669797e8049faa8aa4088e70ff7fcd579d5bdc37626a9e0488a05
- name: kind
value: task
resolver: bundles
workspaces:
- name: git-auth
optional: true
- name: netrc
optional: true

View File

@ -0,0 +1,42 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: ramalama-cli
pipelines.appstudio.openshift.io/type: build
name: ramalama-cli-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/ramalama-cli:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-c4xlarge/amd64
- linux-c4xlarge/arm64
- name: dockerfile
value: container-images/ramalama-cli/Containerfile
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,39 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: ramalama-cli
pipelines.appstudio.openshift.io/type: build
name: ramalama-cli-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/ramalama-cli:{{revision}}
- name: build-platforms
value:
- linux-c4xlarge/amd64
- linux-c4xlarge/arm64
- name: dockerfile
value: container-images/ramalama-cli/Containerfile
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,48 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: ramalama-llama-server
pipelines.appstudio.openshift.io/type: build
name: ramalama-llama-server-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/ramalama-llama-server:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-m2xlarge/amd64
- linux-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/ramalama:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/ramalama:on-pr-{{revision}}
- ENTRYPOINT=/usr/bin/llama-server.sh
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,45 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: ramalama-llama-server
pipelines.appstudio.openshift.io/type: build
name: ramalama-llama-server-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/ramalama-llama-server:{{revision}}
- name: build-platforms
value:
- linux-m2xlarge/amd64
- linux-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/ramalama:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/ramalama:{{revision}}
- ENTRYPOINT=/usr/bin/llama-server.sh
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -1,592 +0,0 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch
== "main" && ( "container-images/ramalama/***".pathChanged() || ".tekton/ramalama-pull-request.yaml".pathChanged()
)
creationTimestamp: null
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: ramalama
pipelines.appstudio.openshift.io/type: build
name: ramalama-on-pull-request
namespace: ramalama-konflux-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-konflux-tenant/ramalama/ramalama:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: dockerfile
value: Containerfile
- name: path-context
value: container-images/ramalama
pipelineSpec:
description: |
This pipeline is ideal for building container images from a Containerfile while maintaining trust after pipeline customization.
_Uses `buildah` to create a container image leveraging [trusted artifacts](https://konflux-ci.dev/architecture/ADR/0036-trusted-artifacts.html). It also optionally creates a source image and runs some build-time tests. Information is shared between tasks using OCI artifacts instead of PVCs. EC will pass the [`trusted_task.trusted`](https://enterprisecontract.dev/docs/ec-policies/release_policy.html#trusted_task__trusted) policy as long as all data used to build the artifact is generated from trusted tasks.
This pipeline is pushed as a Tekton bundle to [quay.io](https://quay.io/repository/konflux-ci/tekton-catalog/pipeline-docker-build-oci-ta?tab=tags)_
finally:
- name: show-sbom
params:
- name: IMAGE_URL
value: $(tasks.build-image-index.results.IMAGE_URL)
taskRef:
params:
- name: name
value: show-sbom
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-show-sbom:0.1@sha256:04f15cbce548e1db7770eee3f155ccb2cc0140a6c371dc67e9a34d83673ea0c0
- name: kind
value: task
resolver: bundles
params:
- description: Source Repository URL
name: git-url
type: string
- default: ""
description: Revision of the Source Repository
name: revision
type: string
- description: Fully Qualified Output Image
name: output-image
type: string
- default: .
description: Path to the source code of an application's component from where
to build image.
name: path-context
type: string
- default: Dockerfile
description: Path to the Dockerfile inside the context specified by parameter
path-context
name: dockerfile
type: string
- default: "false"
description: Force rebuild image
name: rebuild
type: string
- default: "false"
description: Skip checks against built image
name: skip-checks
type: string
- default: "false"
description: Execute the build with network isolation
name: hermetic
type: string
- default: ""
description: Build dependencies to be prefetched by Cachi2
name: prefetch-input
type: string
- default: ""
description: Image tag expiration time, time values could be something like
1h, 2d, 3w for hours, days, and weeks, respectively.
name: image-expires-after
- default: "false"
description: Build a source image.
name: build-source-image
type: string
- default: "false"
description: Add built image into an OCI image index
name: build-image-index
type: string
- default: []
description: Array of --build-arg values ("arg=value" strings) for buildah
name: build-args
type: array
- default: ""
description: Path to a file with build arguments for buildah, see https://www.mankier.com/1/buildah-build#--build-arg-file
name: build-args-file
type: string
results:
- description: ""
name: IMAGE_URL
value: $(tasks.build-image-index.results.IMAGE_URL)
- description: ""
name: IMAGE_DIGEST
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- description: ""
name: CHAINS-GIT_URL
value: $(tasks.clone-repository.results.url)
- description: ""
name: CHAINS-GIT_COMMIT
value: $(tasks.clone-repository.results.commit)
tasks:
- name: init
params:
- name: image-url
value: $(params.output-image)
- name: rebuild
value: $(params.rebuild)
- name: skip-checks
value: $(params.skip-checks)
taskRef:
params:
- name: name
value: init
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-init:0.2@sha256:2f59e9a3c20ce4509356389d327087213cc82c079b30811935837791da140f9f
- name: kind
value: task
resolver: bundles
- name: clone-repository
params:
- name: url
value: $(params.git-url)
- name: revision
value: $(params.revision)
- name: ociStorage
value: $(params.output-image).git
- name: ociArtifactExpiresAfter
value: $(params.image-expires-after)
runAfter:
- init
taskRef:
params:
- name: name
value: git-clone-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-git-clone-oci-ta:0.1@sha256:3e171c1f3a9487a5764ebef629f93b3d2fc01cc8bad382dd8065cdfe42214148
- name: kind
value: task
resolver: bundles
when:
- input: $(tasks.init.results.build)
operator: in
values:
- "true"
workspaces:
- name: basic-auth
workspace: git-auth
- name: prefetch-dependencies
params:
- name: input
value: $(params.prefetch-input)
- name: SOURCE_ARTIFACT
value: $(tasks.clone-repository.results.SOURCE_ARTIFACT)
- name: ociStorage
value: $(params.output-image).prefetch
- name: ociArtifactExpiresAfter
value: $(params.image-expires-after)
runAfter:
- clone-repository
taskRef:
params:
- name: name
value: prefetch-dependencies-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-prefetch-dependencies-oci-ta:0.2@sha256:8398b3332f911b5b5244f8429adae4ec2982e7fb7ab8eecdc4e05a9fb05f60fd
- name: kind
value: task
resolver: bundles
workspaces:
- name: git-basic-auth
workspace: git-auth
- name: netrc
workspace: netrc
- name: build-container
params:
- name: IMAGE
value: $(params.output-image)
- name: DOCKERFILE
value: $(params.dockerfile)
- name: CONTEXT
value: $(params.path-context)
- name: HERMETIC
value: $(params.hermetic)
- name: PREFETCH_INPUT
value: $(params.prefetch-input)
- name: IMAGE_EXPIRES_AFTER
value: $(params.image-expires-after)
- name: COMMIT_SHA
value: $(tasks.clone-repository.results.commit)
- name: BUILD_ARGS
value:
- $(params.build-args[*])
- name: BUILD_ARGS_FILE
value: $(params.build-args-file)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
runAfter:
- prefetch-dependencies
taskRef:
params:
- name: name
value: buildah-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-buildah-oci-ta:0.4@sha256:204db46550475127bd943ed243b560628d645568eb1f6b19a5c1e88cd697182d
- name: kind
value: task
resolver: bundles
when:
- input: $(tasks.init.results.build)
operator: in
values:
- "true"
- name: build-image-index
params:
- name: IMAGE
value: $(params.output-image)
- name: COMMIT_SHA
value: $(tasks.clone-repository.results.commit)
- name: IMAGE_EXPIRES_AFTER
value: $(params.image-expires-after)
- name: ALWAYS_BUILD_INDEX
value: $(params.build-image-index)
- name: IMAGES
value:
- $(tasks.build-container.results.IMAGE_URL)@$(tasks.build-container.results.IMAGE_DIGEST)
runAfter:
- build-container
taskRef:
params:
- name: name
value: build-image-index
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-build-image-index:0.1@sha256:d34e4245b767c5b1b5edbbad9fc9cf8050cf19a69c8e55856479848405c596ec
- name: kind
value: task
resolver: bundles
when:
- input: $(tasks.init.results.build)
operator: in
values:
- "true"
- name: build-source-image
params:
- name: BINARY_IMAGE
value: $(params.output-image)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: source-build-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-source-build-oci-ta:0.2@sha256:66401e328c0036012112caad2ba02617954330689c9c590e9f53cad0256bb5ec
- name: kind
value: task
resolver: bundles
when:
- input: $(tasks.init.results.build)
operator: in
values:
- "true"
- input: $(params.build-source-image)
operator: in
values:
- "true"
- name: deprecated-base-image-check
params:
- name: IMAGE_URL
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: IMAGE_DIGEST
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: deprecated-image-check
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-deprecated-image-check:0.5@sha256:5d63b920b71192906fe4d6c4903f594e6f34c5edcff9d21714a08b5edcfbc667
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: clair-scan
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: clair-scan
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-clair-scan:0.2@sha256:03383b5a8674edef0ae184dd81f00386017624a5af255cb0b5803d7659483ba5
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: ecosystem-cert-preflight-checks
params:
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: ecosystem-cert-preflight-checks
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-ecosystem-cert-preflight-checks:0.1@sha256:df8a25a3431a70544172ed4844f9d0c6229d39130633960729f825a031a7dea9
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: sast-snyk-check
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: sast-snyk-check-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-sast-snyk-check-oci-ta:0.3@sha256:ba2c9c37a287a8220d8810c31211fc7c33f9b1576bcf5cacf2f050824624c9fd
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: clamav-scan
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: clamav-scan
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-clamav-scan:0.2@sha256:c30c12681b02eb4b83aeb4021d0e714a72db4d1d3bb14579652f4d1a763473ab
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: sast-coverity-check
params:
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: IMAGE
value: $(params.output-image)
- name: DOCKERFILE
value: $(params.dockerfile)
- name: CONTEXT
value: $(params.path-context)
- name: HERMETIC
value: $(params.hermetic)
- name: PREFETCH_INPUT
value: $(params.prefetch-input)
- name: IMAGE_EXPIRES_AFTER
value: $(params.image-expires-after)
- name: COMMIT_SHA
value: $(tasks.clone-repository.results.commit)
- name: BUILD_ARGS
value:
- $(params.build-args[*])
- name: BUILD_ARGS_FILE
value: $(params.build-args-file)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
runAfter:
- coverity-availability-check
taskRef:
params:
- name: name
value: sast-coverity-check-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-sast-coverity-check-oci-ta:0.2@sha256:b874e49385d8bdc27dfe273a4ec466f8b2a5b0076c64cef5e86b29ee7ca7c6f2
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- input: $(tasks.coverity-availability-check.results.STATUS)
operator: in
values:
- success
- name: coverity-availability-check
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: coverity-availability-check
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-coverity-availability-check:0.2@sha256:0b35292eed661c5e3ca307c0ba7f594d17555db2a1da567903b0b47697fa23ed
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: sast-shell-check
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: sast-shell-check-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-sast-shell-check-oci-ta:0.1@sha256:371ba9d9f08c55c58e0c76d696644557b92ebff4c8f71facca3a81e0b92bb4f4
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: sast-unicode-check
params:
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: sast-unicode-check-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-sast-unicode-check-oci-ta:0.1@sha256:7ff6753af9bc30b1f1ae982abe174ee50d2467e3e33a8618fd858c64dea6167b
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: apply-tags
params:
- name: IMAGE
value: $(tasks.build-image-index.results.IMAGE_URL)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: apply-tags
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-apply-tags:0.1@sha256:e1d365ce85d6448f6ebd0d0a000d0f45b694950b7545a2c34bfbcf992c80df61
- name: kind
value: task
resolver: bundles
- name: push-dockerfile
params:
- name: IMAGE
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: IMAGE_DIGEST
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: DOCKERFILE
value: $(params.dockerfile)
- name: CONTEXT
value: $(params.path-context)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: push-dockerfile-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-push-dockerfile-oci-ta:0.1@sha256:7647ce9715c23e78a33663b88febe37279099c03f5a96191d0ce1aa4bfc9aa7b
- name: kind
value: task
resolver: bundles
- name: rpms-signature-scan
params:
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: rpms-signature-scan
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-rpms-signature-scan:0.2@sha256:d00d159c370e3c99447516970c316ef57dfd27c29e0ce3cff50727c9c40936d8
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
workspaces:
- name: git-auth
optional: true
- name: netrc
optional: true
taskRunTemplate: {}
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'
status: {}

View File

@ -1,588 +0,0 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch
== "main"
creationTimestamp: null
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: ramalama
pipelines.appstudio.openshift.io/type: build
name: ramalama-on-push
namespace: ramalama-konflux-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-konflux-tenant/ramalama/ramalama:{{revision}}
- name: dockerfile
value: Containerfile
- name: path-context
value: container-images/ramalama
pipelineSpec:
description: |
This pipeline is ideal for building container images from a Containerfile while maintaining trust after pipeline customization.
_Uses `buildah` to create a container image leveraging [trusted artifacts](https://konflux-ci.dev/architecture/ADR/0036-trusted-artifacts.html). It also optionally creates a source image and runs some build-time tests. Information is shared between tasks using OCI artifacts instead of PVCs. EC will pass the [`trusted_task.trusted`](https://enterprisecontract.dev/docs/ec-policies/release_policy.html#trusted_task__trusted) policy as long as all data used to build the artifact is generated from trusted tasks.
This pipeline is pushed as a Tekton bundle to [quay.io](https://quay.io/repository/konflux-ci/tekton-catalog/pipeline-docker-build-oci-ta?tab=tags)_
finally:
- name: show-sbom
params:
- name: IMAGE_URL
value: $(tasks.build-image-index.results.IMAGE_URL)
taskRef:
params:
- name: name
value: show-sbom
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-show-sbom:0.1@sha256:04f15cbce548e1db7770eee3f155ccb2cc0140a6c371dc67e9a34d83673ea0c0
- name: kind
value: task
resolver: bundles
params:
- description: Source Repository URL
name: git-url
type: string
- default: ""
description: Revision of the Source Repository
name: revision
type: string
- description: Fully Qualified Output Image
name: output-image
type: string
- default: .
description: Path to the source code of an application's component from where
to build image.
name: path-context
type: string
- default: Dockerfile
description: Path to the Dockerfile inside the context specified by parameter
path-context
name: dockerfile
type: string
- default: "false"
description: Force rebuild image
name: rebuild
type: string
- default: "false"
description: Skip checks against built image
name: skip-checks
type: string
- default: "false"
description: Execute the build with network isolation
name: hermetic
type: string
- default: ""
description: Build dependencies to be prefetched by Cachi2
name: prefetch-input
type: string
- default: ""
description: Image tag expiration time, time values could be something like
1h, 2d, 3w for hours, days, and weeks, respectively.
name: image-expires-after
- default: "false"
description: Build a source image.
name: build-source-image
type: string
- default: "false"
description: Add built image into an OCI image index
name: build-image-index
type: string
- default: []
description: Array of --build-arg values ("arg=value" strings) for buildah
name: build-args
type: array
- default: ""
description: Path to a file with build arguments for buildah, see https://www.mankier.com/1/buildah-build#--build-arg-file
name: build-args-file
type: string
results:
- description: ""
name: IMAGE_URL
value: $(tasks.build-image-index.results.IMAGE_URL)
- description: ""
name: IMAGE_DIGEST
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- description: ""
name: CHAINS-GIT_URL
value: $(tasks.clone-repository.results.url)
- description: ""
name: CHAINS-GIT_COMMIT
value: $(tasks.clone-repository.results.commit)
tasks:
- name: init
params:
- name: image-url
value: $(params.output-image)
- name: rebuild
value: $(params.rebuild)
- name: skip-checks
value: $(params.skip-checks)
taskRef:
params:
- name: name
value: init
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-init:0.2@sha256:2f59e9a3c20ce4509356389d327087213cc82c079b30811935837791da140f9f
- name: kind
value: task
resolver: bundles
- name: clone-repository
params:
- name: url
value: $(params.git-url)
- name: revision
value: $(params.revision)
- name: ociStorage
value: $(params.output-image).git
- name: ociArtifactExpiresAfter
value: $(params.image-expires-after)
runAfter:
- init
taskRef:
params:
- name: name
value: git-clone-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-git-clone-oci-ta:0.1@sha256:3e171c1f3a9487a5764ebef629f93b3d2fc01cc8bad382dd8065cdfe42214148
- name: kind
value: task
resolver: bundles
when:
- input: $(tasks.init.results.build)
operator: in
values:
- "true"
workspaces:
- name: basic-auth
workspace: git-auth
- name: prefetch-dependencies
params:
- name: input
value: $(params.prefetch-input)
- name: SOURCE_ARTIFACT
value: $(tasks.clone-repository.results.SOURCE_ARTIFACT)
- name: ociStorage
value: $(params.output-image).prefetch
- name: ociArtifactExpiresAfter
value: $(params.image-expires-after)
runAfter:
- clone-repository
taskRef:
params:
- name: name
value: prefetch-dependencies-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-prefetch-dependencies-oci-ta:0.2@sha256:8398b3332f911b5b5244f8429adae4ec2982e7fb7ab8eecdc4e05a9fb05f60fd
- name: kind
value: task
resolver: bundles
workspaces:
- name: git-basic-auth
workspace: git-auth
- name: netrc
workspace: netrc
- name: build-container
params:
- name: IMAGE
value: $(params.output-image)
- name: DOCKERFILE
value: $(params.dockerfile)
- name: CONTEXT
value: $(params.path-context)
- name: HERMETIC
value: $(params.hermetic)
- name: PREFETCH_INPUT
value: $(params.prefetch-input)
- name: IMAGE_EXPIRES_AFTER
value: $(params.image-expires-after)
- name: COMMIT_SHA
value: $(tasks.clone-repository.results.commit)
- name: BUILD_ARGS
value:
- $(params.build-args[*])
- name: BUILD_ARGS_FILE
value: $(params.build-args-file)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
runAfter:
- prefetch-dependencies
taskRef:
params:
- name: name
value: buildah-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-buildah-oci-ta:0.4@sha256:204db46550475127bd943ed243b560628d645568eb1f6b19a5c1e88cd697182d
- name: kind
value: task
resolver: bundles
when:
- input: $(tasks.init.results.build)
operator: in
values:
- "true"
- name: build-image-index
params:
- name: IMAGE
value: $(params.output-image)
- name: COMMIT_SHA
value: $(tasks.clone-repository.results.commit)
- name: IMAGE_EXPIRES_AFTER
value: $(params.image-expires-after)
- name: ALWAYS_BUILD_INDEX
value: $(params.build-image-index)
- name: IMAGES
value:
- $(tasks.build-container.results.IMAGE_URL)@$(tasks.build-container.results.IMAGE_DIGEST)
runAfter:
- build-container
taskRef:
params:
- name: name
value: build-image-index
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-build-image-index:0.1@sha256:d34e4245b767c5b1b5edbbad9fc9cf8050cf19a69c8e55856479848405c596ec
- name: kind
value: task
resolver: bundles
when:
- input: $(tasks.init.results.build)
operator: in
values:
- "true"
- name: build-source-image
params:
- name: BINARY_IMAGE
value: $(params.output-image)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: source-build-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-source-build-oci-ta:0.2@sha256:66401e328c0036012112caad2ba02617954330689c9c590e9f53cad0256bb5ec
- name: kind
value: task
resolver: bundles
when:
- input: $(tasks.init.results.build)
operator: in
values:
- "true"
- input: $(params.build-source-image)
operator: in
values:
- "true"
- name: deprecated-base-image-check
params:
- name: IMAGE_URL
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: IMAGE_DIGEST
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: deprecated-image-check
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-deprecated-image-check:0.5@sha256:5d63b920b71192906fe4d6c4903f594e6f34c5edcff9d21714a08b5edcfbc667
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: clair-scan
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: clair-scan
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-clair-scan:0.2@sha256:03383b5a8674edef0ae184dd81f00386017624a5af255cb0b5803d7659483ba5
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: ecosystem-cert-preflight-checks
params:
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: ecosystem-cert-preflight-checks
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-ecosystem-cert-preflight-checks:0.1@sha256:df8a25a3431a70544172ed4844f9d0c6229d39130633960729f825a031a7dea9
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: sast-snyk-check
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: sast-snyk-check-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-sast-snyk-check-oci-ta:0.3@sha256:ba2c9c37a287a8220d8810c31211fc7c33f9b1576bcf5cacf2f050824624c9fd
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: clamav-scan
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: clamav-scan
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-clamav-scan:0.2@sha256:c30c12681b02eb4b83aeb4021d0e714a72db4d1d3bb14579652f4d1a763473ab
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: sast-coverity-check
params:
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: IMAGE
value: $(params.output-image)
- name: DOCKERFILE
value: $(params.dockerfile)
- name: CONTEXT
value: $(params.path-context)
- name: HERMETIC
value: $(params.hermetic)
- name: PREFETCH_INPUT
value: $(params.prefetch-input)
- name: IMAGE_EXPIRES_AFTER
value: $(params.image-expires-after)
- name: COMMIT_SHA
value: $(tasks.clone-repository.results.commit)
- name: BUILD_ARGS
value:
- $(params.build-args[*])
- name: BUILD_ARGS_FILE
value: $(params.build-args-file)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
runAfter:
- coverity-availability-check
taskRef:
params:
- name: name
value: sast-coverity-check-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-sast-coverity-check-oci-ta:0.2@sha256:b874e49385d8bdc27dfe273a4ec466f8b2a5b0076c64cef5e86b29ee7ca7c6f2
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- input: $(tasks.coverity-availability-check.results.STATUS)
operator: in
values:
- success
- name: coverity-availability-check
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: coverity-availability-check
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-coverity-availability-check:0.2@sha256:0b35292eed661c5e3ca307c0ba7f594d17555db2a1da567903b0b47697fa23ed
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: sast-shell-check
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: sast-shell-check-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-sast-shell-check-oci-ta:0.1@sha256:371ba9d9f08c55c58e0c76d696644557b92ebff4c8f71facca3a81e0b92bb4f4
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: sast-unicode-check
params:
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: sast-unicode-check-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-sast-unicode-check-oci-ta:0.1@sha256:7ff6753af9bc30b1f1ae982abe174ee50d2467e3e33a8618fd858c64dea6167b
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
- name: apply-tags
params:
- name: IMAGE
value: $(tasks.build-image-index.results.IMAGE_URL)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: apply-tags
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-apply-tags:0.1@sha256:e1d365ce85d6448f6ebd0d0a000d0f45b694950b7545a2c34bfbcf992c80df61
- name: kind
value: task
resolver: bundles
- name: push-dockerfile
params:
- name: IMAGE
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: IMAGE_DIGEST
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: DOCKERFILE
value: $(params.dockerfile)
- name: CONTEXT
value: $(params.path-context)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: push-dockerfile-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-push-dockerfile-oci-ta:0.1@sha256:7647ce9715c23e78a33663b88febe37279099c03f5a96191d0ce1aa4bfc9aa7b
- name: kind
value: task
resolver: bundles
- name: rpms-signature-scan
params:
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: rpms-signature-scan
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-rpms-signature-scan:0.2@sha256:d00d159c370e3c99447516970c316ef57dfd27c29e0ce3cff50727c9c40936d8
- name: kind
value: task
resolver: bundles
when:
- input: $(params.skip-checks)
operator: in
values:
- "false"
workspaces:
- name: git-auth
optional: true
- name: netrc
optional: true
taskRunTemplate: {}
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'
status: {}

View File

@ -0,0 +1,48 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: ramalama-rag
pipelines.appstudio.openshift.io/type: build
name: ramalama-rag-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/ramalama-rag:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-d160-m2xlarge/amd64
- linux-d160-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.rag
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/ramalama:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/ramalama:on-pr-{{revision}}
- GPU=cpu
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,45 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: ramalama-rag
pipelines.appstudio.openshift.io/type: build
name: ramalama-rag-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/ramalama-rag:{{revision}}
- name: build-platforms
value:
- linux-d160-m2xlarge/amd64
- linux-d160-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.rag
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/ramalama:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/ramalama:{{revision}}
- GPU=cpu
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,48 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: ramalama-whisper-server
pipelines.appstudio.openshift.io/type: build
name: ramalama-whisper-server-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/ramalama-whisper-server:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-m2xlarge/amd64
- linux-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/ramalama:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/ramalama:on-pr-{{revision}}
- ENTRYPOINT=/usr/bin/whisper-server.sh
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,45 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: ramalama-whisper-server
pipelines.appstudio.openshift.io/type: build
name: ramalama-whisper-server-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/ramalama-whisper-server:{{revision}}
- name: build-platforms
value:
- linux-m2xlarge/amd64
- linux-m2xlarge/arm64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/ramalama:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/ramalama:{{revision}}
- ENTRYPOINT=/usr/bin/whisper-server.sh
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,52 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: ramalama
pipelines.appstudio.openshift.io/type: build
name: ramalama-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/ramalama:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-c4xlarge/amd64
- linux-c4xlarge/arm64
- name: dockerfile
value: container-images/ramalama/Containerfile
- name: test-image
value: quay.io/redhat-user-workloads/ramalama-tenant/bats:on-pr-{{revision}}
- name: test-envs
value:
- RAMALAMA_IMAGE=quay.io/redhat-user-workloads/ramalama-tenant/ramalama:on-pr-{{revision}}
- name: test-commands
value:
- make validate
- make unit-tests
- make cov-tests
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,49 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: ramalama
pipelines.appstudio.openshift.io/type: build
name: ramalama-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/ramalama:{{revision}}
- name: build-platforms
value:
- linux-c4xlarge/amd64
- linux-c4xlarge/arm64
- name: dockerfile
value: container-images/ramalama/Containerfile
- name: test-image
value: quay.io/redhat-user-workloads/ramalama-tenant/bats:{{revision}}
- name: test-envs
value:
- RAMALAMA_IMAGE=quay.io/redhat-user-workloads/ramalama-tenant/ramalama:{{revision}}
- name: test-commands
value:
- make validate
- make unit-tests
- make cov-tests
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,47 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: rocm-llama-server
pipelines.appstudio.openshift.io/type: build
name: rocm-llama-server-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm-llama-server:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/rocm:on-pr-{{revision}}
- ENTRYPOINT=/usr/bin/llama-server.sh
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,44 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: rocm-llama-server
pipelines.appstudio.openshift.io/type: build
name: rocm-llama-server-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm-llama-server:{{revision}}
- name: build-platforms
value:
- linux-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/rocm:{{revision}}
- ENTRYPOINT=/usr/bin/llama-server.sh
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,47 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: rocm-rag
pipelines.appstudio.openshift.io/type: build
name: rocm-rag-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm-rag:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-d160-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.rag
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/rocm:on-pr-{{revision}}
- GPU=rocm
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,44 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: rocm-rag
pipelines.appstudio.openshift.io/type: build
name: rocm-rag-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm-rag:{{revision}}
- name: build-platforms
value:
- linux-d160-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.rag
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/rocm:{{revision}}
- GPU=rocm
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,47 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: rocm-ubi-llama-server
pipelines.appstudio.openshift.io/type: build
name: rocm-ubi-llama-server-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm-ubi-llama-server:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm-ubi:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/rocm-ubi:on-pr-{{revision}}
- ENTRYPOINT=/usr/bin/llama-server.sh
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,44 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: rocm-ubi-llama-server
pipelines.appstudio.openshift.io/type: build
name: rocm-ubi-llama-server-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm-ubi-llama-server:{{revision}}
- name: build-platforms
value:
- linux-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm-ubi:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/rocm-ubi:{{revision}}
- ENTRYPOINT=/usr/bin/llama-server.sh
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,47 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: rocm-ubi-rag
pipelines.appstudio.openshift.io/type: build
name: rocm-ubi-rag-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm-ubi-rag:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-d160-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.rag
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm-ubi:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/rocm-ubi:on-pr-{{revision}}
- GPU=rocm
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,44 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: rocm-ubi-rag
pipelines.appstudio.openshift.io/type: build
name: rocm-ubi-rag-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm-ubi-rag:{{revision}}
- name: build-platforms
value:
- linux-d160-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.rag
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm-ubi:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/rocm-ubi:{{revision}}
- GPU=rocm
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,47 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: rocm-ubi-whisper-server
pipelines.appstudio.openshift.io/type: build
name: rocm-ubi-whisper-server-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm-ubi-whisper-server:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm-ubi:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/rocm-ubi:on-pr-{{revision}}
- ENTRYPOINT=/usr/bin/whisper-server.sh
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,44 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: rocm-ubi-whisper-server
pipelines.appstudio.openshift.io/type: build
name: rocm-ubi-whisper-server-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm-ubi-whisper-server:{{revision}}
- name: build-platforms
value:
- linux-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm-ubi:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/rocm-ubi:{{revision}}
- ENTRYPOINT=/usr/bin/whisper-server.sh
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,41 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: rocm-ubi
pipelines.appstudio.openshift.io/type: build
name: rocm-ubi-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm-ubi:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-fast/amd64
- name: dockerfile
value: container-images/rocm-ubi/Containerfile
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,38 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: rocm-ubi
pipelines.appstudio.openshift.io/type: build
name: rocm-ubi-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm-ubi:{{revision}}
- name: build-platforms
value:
- linux-fast/amd64
- name: dockerfile
value: container-images/rocm-ubi/Containerfile
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,47 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: rocm-whisper-server
pipelines.appstudio.openshift.io/type: build
name: rocm-whisper-server-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm-whisper-server:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm:on-pr-{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/rocm:on-pr-{{revision}}
- ENTRYPOINT=/usr/bin/whisper-server.sh
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,44 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: rocm-whisper-server
pipelines.appstudio.openshift.io/type: build
name: rocm-whisper-server-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm-whisper-server:{{revision}}
- name: build-platforms
value:
- linux-m2xlarge/amd64
- name: dockerfile
value: container-images/common/Containerfile.entrypoint
- name: parent-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm:{{revision}}
- name: build-args
value:
- PARENT=quay.io/redhat-user-workloads/ramalama-tenant/rocm:{{revision}}
- ENTRYPOINT=/usr/bin/whisper-server.sh
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,41 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "pull_request" && target_branch == "main" && body.action != "ready_for_review"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: rocm
pipelines.appstudio.openshift.io/type: build
name: rocm-on-pull-request
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: build-platforms
value:
- linux-fast/amd64
- name: dockerfile
value: container-images/rocm/Containerfile
pipelineRef:
name: pull-request-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,38 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "false"
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: >-
event == "push" && target_branch == "main"
labels:
appstudio.openshift.io/application: ramalama
appstudio.openshift.io/component: rocm
pipelines.appstudio.openshift.io/type: build
name: rocm-on-push
namespace: ramalama-tenant
spec:
params:
- name: git-url
value: '{{source_url}}'
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/ramalama-tenant/rocm:{{revision}}
- name: build-platforms
value:
- linux-fast/amd64
- name: dockerfile
value: container-images/rocm/Containerfile
pipelineRef:
name: push-pipeline
timeouts:
pipeline: 6h
workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

View File

@ -0,0 +1,36 @@
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: test-cmd
spec:
description: Run a command in a test environment.
params:
- name: image
description: The image to use when setting up the test environment.
- name: cmd
description: The command to run.
- name: envs
description: List of environment variables (NAME=VALUE) to be set in the test environment.
type: array
default: []
steps:
- name: run
image: $(params.image)
computeResources:
limits:
memory: 4Gi
requests:
cpu: "1"
memory: 1Gi
securityContext:
capabilities:
add:
- SETFCAP
command:
- /usr/bin/entrypoint.sh
args:
- $(params.envs[*])
- /bin/bash
- -ex
- -c
- $(params.cmd)

View File

@ -0,0 +1,32 @@
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: wait-for-image
spec:
description: Wait for an image to become available.
params:
- name: ref
description: Location of image to wait for.
results:
- name: digest
description: The digest that the image ref resolves to.
steps:
- name: check-and-wait
image: registry.redhat.io/rhel10/skopeo:latest
env:
- name: REF
value: $(params.ref)
- name: RESULTS_DIGEST_PATH
value: $(results.digest.path)
script: |
#!/bin/bash -e
echo "Fetching digest of $REF"
while true; do
DIGEST="$(skopeo inspect -n -f {{.Digest}} "docker://$REF" || :)"
if [ "${#DIGEST}" -gt 0 ]; then
echo -n "$DIGEST" | tee "$RESULTS_DIGEST_PATH"
exit
fi
echo "$(date -uIseconds): digest unavailable, waiting..."
sleep 60
done

View File

@ -56,7 +56,7 @@ This section describes how to make a contribution to RamaLama.
### Prepare your environment
The minimum version of Python required to use RamaLama is Python 3.8
The minimum version of Python required to use RamaLama is Python 3.10
### Fork and clone RamaLama
@ -69,7 +69,8 @@ $ cd ./ramalama/
### Using the Makefile
RamaLama uses a Makefile for common actions such as compiling RamaLama, building the documentation, and linting.
RamaLama uses a Makefile for common actions such as compiling RamaLama, building containers,
building the documentation, linting, executing unit tests or generating coverage reports.
You can list available actions by using:
```shell
@ -80,7 +81,7 @@ Usage: make <target>
### Install required tools
Makefile allow you to install needed development tools (e.g. the linter):
The Makefile allows you to install needed development tools (e.g. the linter):
```shell
$ make install-requirements
```
@ -172,7 +173,7 @@ There are several types of tests run by RamaLama's upstream CI.
### Python Format and lint
All code changes must pass ``make validate``.
All code changes must pass `make validate`.
### System Tests
@ -205,7 +206,7 @@ Regardless of the type of PR, all PRs should include:
* Well-documented code changes, both through comments in the code itself and high-quality commit messages.
* Additional tests. Ideally, they should fail w/o your code change applied.
(With a few exceptions, CI hooks will block your PR unless your change
includes files named `*_test.go` or under the `test/` subdirectory. Repo
includes files under the `test/` subdirectory. Repo
admins may bypass this restriction by setting the 'No New Tests' GitHub
label on the PR).
* Documentation updates to reflect the changes made in the pull request.

7
MANIFEST.in Normal file
View File

@ -0,0 +1,7 @@
include README.md LICENSE
include shortnames/shortnames.conf
include docs/*.1
include docs/*.5
include docs/*.7
recursive-include completions *
recursive-include libexec *

View File

@ -8,6 +8,10 @@ PYTHON ?= $(shell command -v python3 python|head -n1)
DESTDIR ?= /
PATH := $(PATH):$(HOME)/.local/bin
IMAGE ?= ramalama
PROJECT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
PYTHON_SCRIPTS := $(shell grep -lEr "^\#\!\s*/usr/bin/(env +)?python(3)?(\s|$$)" --exclude-dir={.venv,venv} $(PROJECT_DIR) || true)
PYTEST_COMMON_CMD ?= PYTHONPATH=. pytest test/unit/ -vv
BATS_IMAGE ?= localhost/bats:latest
default: help
@ -38,19 +42,17 @@ help:
@echo " - make clean"
@echo
install-detailed-cov-requirements:
pip install ".[cov-detailed]"
.PHONY: install-cov-requirements
install-cov-requirements:
pip install ".[cov]"
.PHONY: install-requirements
install-requirements:
pip install -U pipx
pipx install \
argcomplete~=3.0 \
black~=25.0 \
codespell~=2.0 \
flake8~=7.0 \
huggingface_hub~=0.28.0 \
isort~=6.0 \
pytest~=8.3 \
wheel~=0.45.0
./install-uv.sh
pip install ".[dev]"
.PHONY: install-completions
install-completions: completions
@ -60,9 +62,9 @@ install-completions: completions
install ${SELINUXOPT} -d -m 755 $(DESTDIR)${SHAREDIR}/fish/vendor_completions.d
install ${SELINUXOPT} -m 644 completions/fish/vendor_completions.d/ramalama.fish \
$(DESTDIR)${SHAREDIR}/fish/vendor_completions.d/ramalama.fish
install ${SELINUXOPT} -d -m 755 $(DESTDIR)${SHAREDIR}/zsh/site
install ${SELINUXOPT} -m 644 completions/zsh/vendor-completions/_ramalama \
$(DESTDIR)${SHAREDIR}/zsh/vendor-completions/_ramalama
install ${SELINUXOPT} -d -m 755 $(DESTDIR)${SHAREDIR}/zsh/site-functions
install ${SELINUXOPT} -m 644 completions/zsh/site-functions/_ramalama \
$(DESTDIR)${SHAREDIR}/zsh/site-functions/_ramalama
.PHONY: install-shortnames
install-shortnames:
@ -78,8 +80,8 @@ completions:
mkdir -p completions/fish/vendor_completions.d
register-python-argcomplete --shell fish ramalama > completions/fish/vendor_completions.d/ramalama.fish
mkdir -p completions/zsh/vendor-completions
-register-python-argcomplete --shell zsh ramalama > completions/zsh/vendor-completions/_ramalama
mkdir -p completions/zsh/site-functions
-register-python-argcomplete --shell zsh ramalama > completions/zsh/site-functions/_ramalama
.PHONY: install
install: docs completions
@ -112,23 +114,23 @@ ifneq (,$(wildcard /usr/bin/python3))
/usr/bin/python3 -m compileall -q .
endif
! grep -ri "#\!/usr/bin/python3" .
flake8 *.py */*.py */*/*.py libexec/* bin/*
! grep -ri --exclude-dir ".venv" --exclude-dir "*/.venv" "#\!/usr/bin/python3" .
flake8 $(PROJECT_DIR) $(PYTHON_SCRIPTS)
shellcheck *.sh */*.sh */*/*.sh
.PHONY: check-format
check-format:
black --check --diff *.py */*.py */*/*.py libexec/* bin/*
isort --check --diff *.py */*.py */*/*.py libexec/* bin/*
black --check --diff $(PROJECT_DIR) $(PYTHON_SCRIPTS)
isort --check --diff $(PROJECT_DIR) $(PYTHON_SCRIPTS)
.PHONY: format
format:
black *.py */*.py */*/*.py libexec/* bin/*
isort *.py */*.py */*/*.py libexec/* bin/*
black $(PROJECT_DIR) $(PYTHON_SCRIPTS)
isort $(PROJECT_DIR) $(PYTHON_SCRIPTS)
.PHONY: codespell
codespell:
codespell --dictionary=- --ignore-words-list "cann" -w --skip="*/venv*"
codespell -w $(PROJECT_DIR) $(PYTHON_SCRIPTS)
.PHONY: test-run
test-run:
@ -161,13 +163,50 @@ bats-nocontainer:
bats-docker:
_RAMALAMA_TEST_OPTS=--engine=docker RAMALAMA=$(CURDIR)/bin/ramalama bats -T test/system/
.PHONY: bats-image
bats-image:
podman inspect $(BATS_IMAGE) &> /dev/null || \
podman build -t $(BATS_IMAGE) -f container-images/bats/Containerfile .
bats-in-container: extra-opts = --security-opt unmask=/proc/* --device /dev/net/tun --device /dev/fuse
%-in-container: bats-image
podman run -it --rm \
--userns=keep-id:size=200000 \
--security-opt label=disable \
--security-opt=mask=/sys/bus/pci/drivers/i915 \
$(extra-opts) \
-v $(CURDIR):/src \
$(BATS_IMAGE) make $*
.PHONY: ci
ci:
test/ci.sh
.PHONY: unit-tests
unit-tests:
PYTHONPATH=. pytest test/unit/
$(PYTEST_COMMON_CMD)
.PHONY: unit-tests-verbose
unit-tests-verbose:
$(PYTEST_COMMON_CMD) --full-trace --capture=tee-sys
.PHONY: cov-run
cov-run: install-cov-requirements
PYTHONPATH=. coverage run -m pytest test/unit/
.PHONY: cov-tests
cov-tests: cov-run
PYTHONPATH=. coverage report
.PHONY: detailed-cov-tests
detailed-cov-tests: install-detailed-cov-requirements cov-run
PYTHONPATH=. coverage report -m
PYTHONPATH=. coverage html
PYTHONPATH=. coverage json
PYTHONPATH=. coverage lcov
PYTHONPATH=. coverage xml
.PHONY: end-to-end-tests
end-to-end-tests: validate bats bats-nocontainer ci

1218
README.md

File diff suppressed because it is too large Load Diff

View File

@ -1,53 +1,12 @@
#!/usr/bin/env python3
import errno
import glob
import os
import subprocess
import sys
import urllib
def add_pipx_venvs_bin_to_path():
"""
Adds available pipx virtual environments bin directories to PATH.
This function looks for venv in ~/.local/pipx/venvs/ramalama/bin and
if it exists appends it to the environment variable PATH.
"""
pipx_bin_path = os.path.expanduser('~/.local/pipx/venvs/ramalama/bin')
if os.path.exists(pipx_bin_path):
os.environ["PATH"] += ":" + pipx_bin_path
def main():
if not sys.stdout.isatty():
sys.stdout.reconfigure(line_buffering=True)
def add_site_packages_to_syspath(base_path):
"""
Adds site-packages directories from a given base path to sys.path.
"""
python_version = f'{sys.version_info.major}.{sys.version_info.minor}'
search_pattern = os.path.expanduser(f'{base_path}/lib/python{python_version}/site-packages')
matched_paths = glob.glob(search_pattern)
if matched_paths:
for path in matched_paths:
sys.path.insert(0, path)
return
# Fallback to a more general pattern if the specific version doesn't match
search_pattern = os.path.expanduser(f'{base_path}/lib/python*/site-packages')
matched_paths = glob.glob(search_pattern)
if matched_paths:
for path in matched_paths:
sys.path.insert(0, path)
def main(args):
sharedirs = ["/opt/homebrew/share/ramalama", "/usr/local/share/ramalama", "/usr/share/ramalama"]
syspath = next((d for d in sharedirs if os.path.exists(d + "/ramalama/cli.py")), None)
if syspath:
sys.path.insert(0, syspath)
add_site_packages_to_syspath('~/.local/pipx/venvs/*')
add_site_packages_to_syspath('/usr/local')
add_pipx_venvs_bin_to_path()
sys.path.insert(0, './')
try:
import ramalama
@ -55,54 +14,8 @@ def main(args):
print(f"ramalama module not found in sys.path: {sys.path}", file=sys.stderr)
raise
parser, args = ramalama.init_cli()
# if autocomplete doesn't exist, just do nothing, don't break
try:
import argcomplete
argcomplete.autocomplete(parser)
except Exception:
None
def eprint(e, exit_code):
ramalama.perror("Error: " + str(e).strip("'\""))
sys.exit(exit_code)
try:
from ramalama.migrate import ModelStoreImport
ModelStoreImport(args.store).import_all()
except Exception as ex:
print(f"Failed to import models to new store: {ex}")
# Process CLI
try:
args.func(args)
except urllib.error.HTTPError as e:
eprint(f"pulling {e.geturl()} failed: {e} ", errno.EINVAL)
except ramalama.HelpException:
parser.print_help()
except AttributeError as e:
parser.print_usage()
print("ramalama: requires a subcommand")
if args.debug:
raise e
except IndexError as e:
eprint(e, errno.EINVAL)
except KeyError as e:
eprint(e, 1)
except NotImplementedError as e:
eprint(e, errno.ENOTSUP)
except subprocess.CalledProcessError as e:
eprint(e, e.returncode)
except KeyboardInterrupt:
sys.exit(0)
except ValueError as e:
eprint(e, errno.EINVAL)
except IOError as e:
eprint(e, errno.EIO)
ramalama.cli.main()
if __name__ == "__main__":
main(sys.argv[1:])
main()

View File

@ -1,6 +1,7 @@
FROM fedora:42
FROM quay.io/fedora/fedora:42
ENV ASAHI_VISIBLE_DEVICES 1
COPY --chmod=755 ../scripts /usr/bin
RUN build_llama_and_whisper.sh "asahi"
COPY . /src/ramalama
WORKDIR /src/ramalama
RUN container-images/scripts/build_llama_and_whisper.sh asahi
WORKDIR /

Some files were not shown because too many files have changed in this diff Show More