Skip to content

Commit a523095

Browse files
committed
Add Red Hat llama-stack image support
- Add test.containerfile to extend Red Hat image with FAISS - Update docker-compose.yaml to use Red Hat llama-stack image - Configure platform and volume paths for Red Hat image compatibility - Fix Containerfile build issue by temporarily disabling uv installation in final stage
1 parent 00af363 commit a523095

File tree

3 files changed

+15
-29
lines changed

3 files changed

+15
-29
lines changed

Containerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ COPY --from=builder /app-root/LICENSE /licenses/
5757
# Add uv to final image for derived images to add additional dependencies
5858
# with command:
5959
# $ uv pip install <dependency>
60-
RUN pip3.12 install "uv==0.8.15"
60+
# Temporarily disabled due to temp directory issues
61+
# RUN pip3.12 install "uv==0.8.15"
6162

6263
USER root
6364

docker-compose.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
services:
2+
# Red Hat llama-stack distribution with FAISS
23
llama-stack:
34
build:
45
context: .
56
dockerfile: test.containerfile
7+
platform: linux/amd64
68
container_name: llama-stack
79
ports:
810
- "8321:8321" # Expose llama-stack on 8321 (adjust if needed)
911
volumes:
10-
- ./run.yaml:/app-root/run.yaml:Z
12+
- ./run.yaml:/opt/app-root/run.yaml:Z
1113
environment:
1214
- OPENAI_API_KEY=${OPENAI_API_KEY}
15+
- BRAVE_SEARCH_API_KEY=${BRAVE_SEARCH_API_KEY:-}
16+
- TAVILY_SEARCH_API_KEY=${TAVILY_SEARCH_API_KEY:-}
1317
networks:
1418
- lightspeednet
1519
healthcheck:
@@ -44,4 +48,4 @@ services:
4448

4549
networks:
4650
lightspeednet:
47-
driver: bridge
51+
driver: bridge

test.containerfile

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,9 @@
1-
# vim: set filetype=dockerfile
2-
FROM registry.access.redhat.com/ubi9/ubi-minimal
1+
# Custom Red Hat llama-stack image with missing dependencies
2+
FROM quay.io/opendatahub/llama-stack:rhoai-v2.25-latest
33

4-
ARG APP_ROOT=/app-root
4+
# Install missing dependencies
5+
USER root
6+
RUN pip install faiss-cpu==1.11.0
57

6-
ENV PATH="$PATH:/root/.local/bin"
7-
8-
WORKDIR ${APP_ROOT}
9-
COPY run.yaml ./
10-
COPY pyproject.toml ./
11-
COPY uv.lock ./
12-
COPY LICENSE ./
13-
COPY README.md ./
14-
COPY src/ ./src/
15-
16-
RUN microdnf install -y --nodocs --setopt=keepcache=0 --setopt=tsflags=nodocs \
17-
python3.12 python3.12-devel python3.12-pip git tar gcc gcc-c++ make
18-
19-
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
20-
21-
RUN uv -h
22-
23-
# Install from pyproject.toml using uv sync for version consistency
24-
# Note: using --no-install-project since this is llama-stack container, not lightspeed-stack
25-
# Include dev deps for testing (pytest, behave, etc.)
26-
RUN uv sync --locked --no-install-project --group dev --group llslibdev
27-
28-
CMD ["uv", "run", "llama", "stack", "run", "run.yaml"]
8+
# Switch back to the original user
9+
USER 1001

0 commit comments

Comments
 (0)