Skip to content

Commit 9b60257

Browse files
committed
Add Red Hat llama-stack image support
- Add Dockerfile.rh-llama-stack 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
1 parent 00af363 commit 9b60257

File tree

2 files changed

+19
-34
lines changed

2 files changed

+19
-34
lines changed

docker-compose.yaml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
services:
2+
# Red Hat llama-stack distribution with FAISS
23
llama-stack:
34
build:
45
context: .
5-
dockerfile: test.containerfile
6+
dockerfile: Dockerfile.rh-llama-stack
7+
platform: linux/amd64
68
container_name: llama-stack
79
ports:
8-
- "8321:8321" # Expose llama-stack on 8321 (adjust if needed)
10+
- "8321:8321"
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:
1620
test: ["CMD", "curl", "-f", "http://localhost:8321/v1/health"]
17-
interval: 10s # how often to run the check
18-
timeout: 5s # how long to wait before considering it failed
19-
retries: 3 # how many times to retry before marking as unhealthy
20-
start_period: 15s # time to wait before starting checks
21+
interval: 10s
22+
timeout: 5s
23+
retries: 3
24+
start_period: 30s
2125

2226
lightspeed-stack:
2327
build:
@@ -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)