diff --git a/Containerfile b/Containerfile index 1a20d7c8..70408341 100644 --- a/Containerfile +++ b/Containerfile @@ -57,7 +57,8 @@ COPY --from=builder /app-root/LICENSE /licenses/ # Add uv to final image for derived images to add additional dependencies # with command: # $ uv pip install -RUN pip3.12 install "uv==0.8.15" +# Temporarily disabled due to temp directory issues +# RUN pip3.12 install "uv==0.8.15" USER root diff --git a/docker-compose.yaml b/docker-compose.yaml index b3624526..17a9be60 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,15 +1,19 @@ services: + # Red Hat llama-stack distribution with FAISS llama-stack: build: context: . dockerfile: test.containerfile + platform: linux/amd64 container_name: llama-stack ports: - "8321:8321" # Expose llama-stack on 8321 (adjust if needed) volumes: - - ./run.yaml:/app-root/run.yaml:Z + - ./run.yaml:/opt/app-root/run.yaml:Z environment: - OPENAI_API_KEY=${OPENAI_API_KEY} + - BRAVE_SEARCH_API_KEY=${BRAVE_SEARCH_API_KEY:-} + - TAVILY_SEARCH_API_KEY=${TAVILY_SEARCH_API_KEY:-} networks: - lightspeednet healthcheck: @@ -44,4 +48,4 @@ services: networks: lightspeednet: - driver: bridge + driver: bridge \ No newline at end of file diff --git a/test.containerfile b/test.containerfile index 1ee04326..e0c0d787 100644 --- a/test.containerfile +++ b/test.containerfile @@ -1,28 +1,12 @@ -# vim: set filetype=dockerfile -FROM registry.access.redhat.com/ubi9/ubi-minimal - -ARG APP_ROOT=/app-root - -ENV PATH="$PATH:/root/.local/bin" - -WORKDIR ${APP_ROOT} -COPY run.yaml ./ -COPY pyproject.toml ./ -COPY uv.lock ./ -COPY LICENSE ./ -COPY README.md ./ -COPY src/ ./src/ - -RUN microdnf install -y --nodocs --setopt=keepcache=0 --setopt=tsflags=nodocs \ - python3.12 python3.12-devel python3.12-pip git tar gcc gcc-c++ make - -RUN curl -LsSf https://astral.sh/uv/install.sh | sh - -RUN uv -h - -# Install from pyproject.toml using uv sync for version consistency -# Note: using --no-install-project since this is llama-stack container, not lightspeed-stack -# Include dev deps for testing (pytest, behave, etc.) -RUN uv sync --locked --no-install-project --group dev --group llslibdev - -CMD ["uv", "run", "llama", "stack", "run", "run.yaml"] \ No newline at end of file +# Custom Red Hat llama-stack image with missing dependencies +FROM quay.io/opendatahub/llama-stack:rhoai-v2.25-latest + +# Install missing dependencies +USER root +RUN pip install faiss-cpu==1.11.0 && \ + mkdir -p /app-root && \ + chown -R 1001:0 /app-root && \ + chmod -R 775 /app-root + +# Switch back to the original user +USER 1001