-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathContainerfile.base
More file actions
36 lines (27 loc) · 1.03 KB
/
Containerfile.base
File metadata and controls
36 lines (27 loc) · 1.03 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
ARG FLAVOR=cpu
FROM registry.access.redhat.com/ubi9/python-311 as cpu-base
ARG FLAVOR
FROM nvcr.io/nvidia/cuda:12.6.2-devel-ubi9 as gpu-base
ARG FLAVOR
RUN dnf install -y python3.11 python3.11-pip libcudnn8 libnccl git
RUN ln -sf /usr/bin/python3.11 /usr/bin/python
ENV LD_LIBRARY_PATH=/usr/local/cuda-12.6/compat:$LD_LIBRARY_PATH
FROM ${FLAVOR}-base as road-core-rag-builder
ARG FLAVOR
USER 0
RUN dnf install -y rubygems && \
dnf clean all && \
gem install asciidoctor
WORKDIR /rag-content
ENV EMBEDDING_MODEL=sentence-transformers/all-mpnet-base-v2
COPY . /rag-content
RUN make install-global
# Test torch
RUN if [[ $(echo $LD_LIBRARY_PATH) == *"/usr/local/cuda-12.6/compat"* ]]; then \
python -c "import torch; print(torch.version.cuda); print(torch.cuda.is_available());"; \
fi
# # Download embeddings model
RUN python ./scripts/download_embeddings_model.py \
-l ./embeddings_model \
-r ${EMBEDDING_MODEL}
LABEL description="Contains embedding model and dependencies needed to generate a vector database"