-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathContainerfile.add_llama_to_lightspeed
More file actions
37 lines (24 loc) · 1.45 KB
/
Containerfile.add_llama_to_lightspeed
File metadata and controls
37 lines (24 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM quay.io/redhat-services-prod/assisted-installer-tenant/saas/assisted-chat-rag@sha256:39edcb0c36c3f0140acd2dfe5d0545dfbc3fb2e20e481b266aaf8dd962275af4 AS rag
# vim: set filetype=dockerfile
FROM localhost/local-ai-chat-lightspeed-stack:latest
USER root
ADD ./llama-stack /app-root/llama-stack
RUN python3.12 -m ensurepip
RUN cd /app-root/llama-stack && python3.12 -m pip install --editable .
RUN cd /app-root/ && python3.12 -m pip install .
RUN microdnf install -y patch
# Patch created based on https://github.com/llamastack/llama-stack/pull/3957
COPY llama-stack-make-tool-call-args-fully-recursive.patch /tmp/
RUN cat /tmp/llama-stack-make-tool-call-args-fully-recursive.patch \
| patch -p1 -d "$(dirname "$(dirname "$(python3.12 -c "import llama_stack; print(llama_stack.__file__)")")")"
# Patch to add required and default parameters to MCP tool definitions
COPY llama-stack-mcp-tool-params.patch /tmp/
RUN cat /tmp/llama-stack-mcp-tool-params.patch \
| patch -p1 -d "$(dirname "$(dirname "$(python3.12 -c "import llama_stack; print(llama_stack.__file__)")")")"
COPY --chown=1001:1001 --from=rag /all-mpnet-base-v2/ /app-root/all-mpnet-base-v2/
COPY --chown=1001:1001 --chmod=666 --from=rag /llama_stack_vector_db/faiss_store.db /llama_stack_vector_db/faiss_store.db
RUN chmod 777 /llama_stack_vector_db/
COPY migrate.py /app/migrate.py
ENTRYPOINT ["/bin/sh", "-c", "python3.12 /app/migrate.py && python3.12 src/lightspeed_stack.py"]
USER 1001
EXPOSE 8080