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):