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

18 Commits

Author SHA1 Message Date
Oliver Walsh
e956d11d70 Use default (auto) value for llama.cpp flash-attn
Also fix the uses_nvidia logic which was inverted.

Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2026-01-29 12:21:11 +00:00
Oliver Walsh
70a3be3d4c Drop test_serve_api from e2e tests
Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2026-01-28 16:52:43 +00:00
Oliver Walsh
22efcb53cb Speed up quadlet/kube generate bats/e2e tests
Disable image pulling when using HIP_VISIBLE_DEVICES, otherwise the large
rocm image will be pulled.

Skip all of the generate tests when --nocontainer is true.

Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2026-01-28 16:52:43 +00:00
Oliver Walsh
87ab0b7ca6 Merge pull request #2311 from olliewalsh/fix_vllm
Fix handling of alternative inference engines
2026-01-24 02:30:35 +00:00
Oliver Walsh
aa7a271c73 Fix handling of inference spec which uses the image entrypoint
Use a ContainerEntryPoint object in exec_args to indicate that
the entrypoint from the container image is used.
If so, skip this first arg when executing container commands and
omit the `command` field from the kube file podspectemplate.

Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2026-01-24 00:51:23 +00:00
Oliver Walsh
867e1e6865 Fix vLLM inference spec and chat client
Omit the previous command ("binary" in the spec) as the vLLM images use the
entrypoint to run vLLM.

Fix --served-model-name option.
This refered to a non-existant model.model_name ctx variable.
Use model.alias instead.

Use precisely the same model name from the chat client.
vLLM will exit when this is not equal to the served-model-name.

Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2026-01-24 00:51:23 +00:00
Oliver Walsh
a7c2a4e4fe Work around race condition in test/e2e/test_serve.py::test_serve_and_stop
Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2026-01-24 00:47:25 +00:00
Mike Bonnet
d7872a0a92 test_serve.py: pull model before testing non-existent image behavior
If the requested model is missing, "ramalama serve --pull never" will exit with
"Error: <model> does not exist" and returncode 22. To test the behavior of a
non-existent image reference, the requested model must already be available locally.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2026-01-21 10:19:25 -08:00
Oliver Walsh
98e07afed0 Ignore port in rag serve e2e test, it's not static
Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2026-01-20 08:41:46 +00:00
Mike Bonnet
55b496773b e2e: skip tests requiring -rag images on ppc64le and s390x
-rag images are only build on x86_64 and arm64 due to missing dependencies
on other architectures.

Unset some environment variables in tests that validate config defaults.

Loosen the checks in a couple tests so that -rag images can be referenced by
digest. Used by Konflux CI when testing unreleased images.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2026-01-16 15:22:45 -08:00
Mike Bonnet
dd540aa0a5 e2e: build a container for running the e2e tests
Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2026-01-16 14:07:50 -08:00
Daniel J Walsh
50222f9458 Add support for converting to OCI artifacts
Add Podman >= 5.7.0 version requirement for artifact tests

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

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

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

Cursor-AI-Generated

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-12-15 08:16:39 -05:00
Oliver Walsh
2ac039a8f7 Fix e2e tests on windows
Install OpenSSL for Windows CI.
Replace htpasswd cli with bcrypt.

isatty() is True for NUL on Windows but false for /dev/null.
Use a pipe instead for testing tty logic.

Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2025-12-12 16:33:23 +00:00
Oliver Walsh
f5bb29f470 Workaround missing contextlib.chdir in python 3.10
Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2025-12-11 17:28:01 +00:00
Oliver Walsh
3841a03882 Windows e2e test fixes
Fixed a number of instances where posix path were assumed.

xfail all remaining windows test failures, mostly due to lack of fork().

Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2025-12-05 14:52:16 +00:00
Brian M
d820d99bf9 fix: addressed rag read write error and timeout error (#2168)
this fix address both errors that prevent rag run and service from starting

Signed-off-by: Brian <bmahabir@bu.edu>
2025-11-17 23:16:49 -05:00
Daniel J Walsh
d091c8bff5 Fix RAG mount option incompatibility with Docker
Docker does not accept the mount option 'rw=true' in the --mount syntax,
resulting in the error:
  invalid argument "...rw=true" for "--mount" flag: unexpected key 'rw' in 'rw=true'

Since read-write is the default behavior for mounts in both Docker and
Podman, the 'rw=true' option can simply be omitted.

Changes:
- Removed 'rw=true' from type=bind mount in add_rag() for DB source
- Removed 'rw=true' from type=image mount in add_rag() for image source
- Updated comment to clarify default behavior

Update tests to remove rw=true mount option checks

Update system and e2e tests to match the removal of the rw=true
mount option in RAG functionality. Since read-write is the default
behavior for mounts, the tests no longer need to check for this
explicit option.

Changes:
- Updated test/system/070-rag.bats: Removed rw=true from mount checks
  on lines 62 and 79
- Updated test/system/040-serve.bats: Removed rw=true from mount check
  on line 547
- Updated test/e2e/test_serve.py: Removed rw=true from mount assertion
  on line 752

This PR was created with the help of Cursor AI.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-11-14 08:38:00 -05:00
Roberto Majadas
766041ba4e Add e2e pytest test for serve command
- Migrate to e2e pytest the `test/system/040-serve.bats` bat test.
- Create a container registry fixture to test interactions with private
registries.
- The tests cover a wide range of functionalities, including:
  - Validation of various CLI arguments and flags.
  - Generation of Quadlet and Kubernetes files.
  - Serving with different APIs and RAG.
  - Error handling for invalid inputs.

Signed-off-by: Roberto Majadas <rmajadas@redhat.com>
2025-11-11 15:09:18 +01:00