-
Notifications
You must be signed in to change notification settings - Fork 2
/
Containerfile-aap
49 lines (39 loc) · 1.83 KB
/
Containerfile-aap
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
37
38
39
40
41
42
43
44
45
46
47
48
49
ARG EMBEDDING_MODEL=sentence-transformers/all-mpnet-base-v2
FROM registry.access.redhat.com/ubi9/python-311 as aap-rag-builder
ARG EMBEDDING_MODEL
ARG AAP_VERSION=2.5
USER 0
WORKDIR /workdir
COPY pyproject.toml pdm.lock Makefile .
RUN make install-tools && pdm config python.use_venv false && make pdm-lock-check install-deps
COPY aap-product-docs-plaintext ./aap-product-docs-plaintext
COPY additional_docs ./additional_docs
COPY scripts/download_embeddings_model.py .
RUN pdm run python download_embeddings_model.py -l ./embeddings_model -r ${EMBEDDING_MODEL}
COPY scripts/generate_embeddings-aap.py .
RUN set -e && pdm run python generate_embeddings-aap.py \
-f aap-product-docs-plaintext \
-mn ${EMBEDDING_MODEL} \
-o vector_db/aap_product_docs/${AAP_VERSION} \
-i aap-product-docs-$(echo $AAP_VERSION | sed 's/\./_/g') \
-v ${AAP_VERSION}
FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:d85040b6e3ed3628a89683f51a38c709185efc3fb552db2ad1b9180f2a6c38be
COPY --from=aap-rag-builder /workdir/vector_db/aap_product_docs /rag/vector_db/aap_product_docs
COPY --from=aap-rag-builder /workdir/embeddings_model /rag/embeddings_model
# this directory is checked by ecosystem-cert-preflight-checks task in Konflux
RUN mkdir /licenses
COPY LICENSE /licenses/
# Labels for enterprise contract
LABEL com.redhat.component=aap-rag-content
LABEL description="Red Hat Ansible Automation Platform RAG content"
LABEL distribution-scope=private
LABEL io.k8s.description="Red Hat Ansible Automation Platform RAG content"
LABEL io.k8s.display-name="Ansible Automation Platform RAG content"
LABEL io.ansible.tags="ansible,aap,ai,assistant,rag"
LABEL name=aap-rag-content
LABEL release=0.0.1
LABEL url="https://github.com/ansible/aap-rag-content"
LABEL vendor="Red Hat"
LABEL version=0.0.1
LABEL summary="Red Hat Ansible Automation Platform RAG content"
USER 65532:65532