Skip to content

Commit 06696c8

Browse files
SpycshZhenzhong1
andauthored
[ChatQnA] Add no_wrapper benchmarking and update legacy manifests (#767)
Co-authored-by: Zhenzhong1 <zhenzhong.xu@intel.com>
1 parent bc4bbfa commit 06696c8

27 files changed

+8728
-1943
lines changed

ChatQnA/Dockerfile.no_wrapper

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,4 @@ USER user
3131

3232
WORKDIR /home/user
3333

34-
RUN echo 'ulimit -S -n 999999' >> ~/.bashrc
35-
3634
ENTRYPOINT ["python", "chatqna_no_wrapper.py"]
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
3+
# Copyright (C) 2024 Intel Corporation
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
FROM python:3.11-slim
7+
8+
RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \
9+
libgl1-mesa-glx \
10+
libjemalloc-dev \
11+
vim \
12+
git
13+
14+
RUN useradd -m -s /bin/bash user && \
15+
mkdir -p /home/user && \
16+
chown -R user /home/user/
17+
18+
WORKDIR /home/user/
19+
RUN git clone https://github.com/opea-project/GenAIComps.git
20+
21+
WORKDIR /home/user/GenAIComps
22+
RUN pip install --no-cache-dir --upgrade pip && \
23+
pip install --no-cache-dir -r /home/user/GenAIComps/requirements.txt && \
24+
pip install --no-cache-dir langchain_core
25+
26+
COPY ./chatqna_no_wrapper.py /home/user/chatqna_no_wrapper.py
27+
28+
ENV PYTHONPATH=$PYTHONPATH:/home/user/GenAIComps
29+
30+
USER user
31+
32+
WORKDIR /home/user
33+
34+
ENTRYPOINT ["python", "chatqna_no_wrapper.py", "--without-rerank"]

ChatQnA/benchmark/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@ Results will be displayed in the terminal and saved as CSV file named `1_stats.c
3737
- Set up kubectl on the master node with access to the Kubernetes cluster.
3838
- Install Python 3.8+ on the master node for running the stress tool.
3939
- Ensure all nodes have a local /mnt/models folder, which will be mounted by the pods.
40+
- Ensure that the container's ulimit can meet the the number of requests.
41+
42+
```bash
43+
# The way to modify the containered ulimit:
44+
sudo systemctl edit containerd
45+
# Add two lines:
46+
[Service]
47+
LimitNOFILE=65536:1048576
48+
49+
sudo systemctl daemon-reload; sudo systemctl restart containerd
50+
```
4051

4152
### Kubernetes Cluster Example
4253

0 commit comments

Comments
 (0)