From d4ec593a35fa38f5a5fef499eeef7ffba9e6f3b6 Mon Sep 17 00:00:00 2001 From: reluctantfuturist Date: Thu, 17 Apr 2025 17:02:36 -0700 Subject: [PATCH] docs(build): clarify UBI9 compiler requirement and remove redundant test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added a comment in build_container.sh to explain why we install python3.11‑devel, gcc, and make on UBI9. - Removed tests/integration/test_ubi9_toolchain.py and pytest.ini, as the test provided little value --- llama_stack/distribution/build_container.sh | 3 +++ tests/integration/test_ubi9_toolchain.py | 29 --------------------- tests/pytest.ini | 3 --- 3 files changed, 3 insertions(+), 32 deletions(-) delete mode 100644 tests/integration/test_ubi9_toolchain.py delete mode 100644 tests/pytest.ini diff --git a/llama_stack/distribution/build_container.sh b/llama_stack/distribution/build_container.sh index 3102878b0..97259ed0a 100755 --- a/llama_stack/distribution/build_container.sh +++ b/llama_stack/distribution/build_container.sh @@ -72,6 +72,9 @@ if [[ $container_base == *"registry.access.redhat.com/ubi9"* ]]; then FROM $container_base WORKDIR /app +# We install the Python 3.11 dev headers and build tools so that any +# C‑extension wheels (e.g. polyleven, faiss‑cpu) can compile successfully. + RUN dnf -y update && dnf install -y iputils net-tools wget \ vim-minimal python3.11 python3.11-pip python3.11-wheel \ python3.11-setuptools python3.11-devel gcc make && \ diff --git a/tests/integration/test_ubi9_toolchain.py b/tests/integration/test_ubi9_toolchain.py deleted file mode 100644 index 108f7a2c0..000000000 --- a/tests/integration/test_ubi9_toolchain.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under the terms described in the LICENSE file in -# the root directory of this source tree. - -# tests/integration/test_ubi9_toolchain.py - -from pathlib import Path - - -def test_ubi9_compiler_packages_present(): - """ - Verify that the UBI9 dnf install line in build_container.sh includes - python3.11‑setuptools, python3.11‑devel, gcc, and make. - """ - script = ( - Path(__file__).parents[2] # moves from tests/integration up to repo root - / "llama_stack" - / "distribution" - / "build_container.sh" - ) - content = script.read_text(encoding="utf-8") - - expected = "python3.11-setuptools python3.11-devel gcc make" - assert expected in content, ( - f"Expected to find '{expected}' in the UBI9 install line, but it was missing.\n\n" - f"Content of {script}:\n{content}" - ) diff --git a/tests/pytest.ini b/tests/pytest.ini deleted file mode 100644 index 64ec09bd2..000000000 --- a/tests/pytest.ini +++ /dev/null @@ -1,3 +0,0 @@ -[pytest] -markers = - integration: slow / docker‑dependent tests