File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -5,15 +5,18 @@ ARG LOG_LEVEL=info
5
5
ARG OUT_IMAGE_TAG=byok-image
6
6
ARG BYOK_TOOL_IMAGE
7
7
ARG UBI_BASE_IMAGE
8
- RUN dnf install -y buildah python3.11 python3.11-pip
8
+ RUN dnf install -y buildah python3.11 python3.11-pip wget
9
9
10
10
USER 0
11
11
WORKDIR /workdir
12
12
13
13
COPY requirements.cpu.txt .
14
- RUN pip3.11 install --no-cache-dir -r requirements.cpu.txt
14
+ RUN pip3.11 install --upgrade pip && pip3.11 install -- no-cache-dir -r requirements.cpu.txt
15
15
16
16
COPY embeddings_model ./embeddings_model
17
+ RUN cd embeddings_model && if [ ! -f embeddings_model/model.safetensors ]; then \
18
+ wget -q https://huggingface.co/sentence-transformers/all-mpnet-base-v2/resolve/9a3225965996d404b775526de6dbfe85d3368642/model.safetensors; \
19
+ fi
17
20
COPY byok/generate_embeddings_tool.py byok/Containerfile.output .
18
21
19
22
ENV _BUILDAH_STARTED_IN_USERNS=" "
Original file line number Diff line number Diff line change @@ -92,7 +92,11 @@ def file_metadata_func(file_path: str) -> Dict:
92
92
93
93
# Load documents
94
94
documents = SimpleDirectoryReader (
95
- args .input_dir , recursive = True , file_metadata = file_metadata_func
95
+ args .input_dir ,
96
+ recursive = True ,
97
+ required_exts = [".md" ],
98
+ file_extractor = {".md" : FlatReader ()},
99
+ file_metadata = file_metadata_func
96
100
).load_data ()
97
101
98
102
# Create chunks/nodes
You can’t perform that action at this time.
0 commit comments