From 87905ad00da2dcc1f70f820259482e1c268f3385 Mon Sep 17 00:00:00 2001 From: ZePan110 Date: Tue, 13 Aug 2024 15:10:45 +0800 Subject: [PATCH 1/2] Fix embeddings_langchain-mosec issue. (#473) Signed-off-by: zepan --- comps/embeddings/langchain-mosec/mosec-docker/Dockerfile | 3 +-- comps/embeddings/langchain-mosec/mosec-docker/server-ipex.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/comps/embeddings/langchain-mosec/mosec-docker/Dockerfile b/comps/embeddings/langchain-mosec/mosec-docker/Dockerfile index a8241e04e..945f7b90c 100644 --- a/comps/embeddings/langchain-mosec/mosec-docker/Dockerfile +++ b/comps/embeddings/langchain-mosec/mosec-docker/Dockerfile @@ -10,7 +10,6 @@ ARG DEBIAN_FRONTEND=noninteractive ENV GLIBC_TUNABLES glibc.cpu.x86_shstk=permissive RUN apt update && apt install -y python3 python3-pip -USER user COPY comps /home/user/comps RUN pip3 install torch==2.2.2 torchvision --index-url https://download.pytorch.org/whl/cpu @@ -19,7 +18,7 @@ RUN pip3 install transformers RUN pip3 install llmspec mosec RUN cd /home/user/ && export HF_ENDPOINT=https://hf-mirror.com && huggingface-cli download --resume-download BAAI/bge-large-zh-v1.5 --local-dir /home/user/bge-large-zh-v1.5 - +USER user ENV EMB_MODEL="/home/user/bge-large-zh-v1.5/" WORKDIR /home/user/comps/embeddings/langchain-mosec/mosec-docker diff --git a/comps/embeddings/langchain-mosec/mosec-docker/server-ipex.py b/comps/embeddings/langchain-mosec/mosec-docker/server-ipex.py index 6db56fb88..9639b424a 100644 --- a/comps/embeddings/langchain-mosec/mosec-docker/server-ipex.py +++ b/comps/embeddings/langchain-mosec/mosec-docker/server-ipex.py @@ -13,7 +13,7 @@ from llmspec import EmbeddingData, EmbeddingRequest, EmbeddingResponse, TokenUsage from mosec import ClientError, Runtime, Server, Worker -DEFAULT_MODEL = "/root/bge-large-zh-v1.5/" +DEFAULT_MODEL = "/home/user/bge-large-zh-v1.5/" class Embedding(Worker): From 075e84f517fe39c631db2e51a06e8e7e89a7cefa Mon Sep 17 00:00:00 2001 From: ganesanintel Date: Tue, 13 Aug 2024 12:46:24 +0530 Subject: [PATCH 2/2] Address test case failure (#462) Signed-off-by: V, Ganesan --- comps/dataprep/pgvector/langchain/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/comps/dataprep/pgvector/langchain/requirements.txt b/comps/dataprep/pgvector/langchain/requirements.txt index 87680d503..84fd48e52 100644 --- a/comps/dataprep/pgvector/langchain/requirements.txt +++ b/comps/dataprep/pgvector/langchain/requirements.txt @@ -22,6 +22,7 @@ psycopg2-binary pymupdf pyspark python-docx +python-multipart python-pptx sentence_transformers shortuuid