diff --git a/comps/dataprep/milvus/config.py b/comps/dataprep/milvus/config.py index 0f8c57139..b4cb72233 100644 --- a/comps/dataprep/milvus/config.py +++ b/comps/dataprep/milvus/config.py @@ -12,7 +12,7 @@ MILVUS_PORT = int(os.getenv("MILVUS_PORT", 19530)) COLLECTION_NAME = os.getenv("COLLECTION_NAME", "rag_milvus") -MOSEC_EMBEDDING_MODEL = os.environ.get("MOSEC_EMBEDDING_MODEL", "/root/bce-embedding-base_v1") +MOSEC_EMBEDDING_MODEL = os.environ.get("MOSEC_EMBEDDING_MODEL", "/home/user/bce-embedding-base_v1") MOSEC_EMBEDDING_ENDPOINT = os.environ.get("MOSEC_EMBEDDING_ENDPOINT", "") os.environ["OPENAI_API_BASE"] = MOSEC_EMBEDDING_ENDPOINT os.environ["OPENAI_API_KEY"] = "Dummy key" diff --git a/comps/embeddings/langchain-mosec/embedding_mosec.py b/comps/embeddings/langchain-mosec/embedding_mosec.py index f34b56a18..f13c23eca 100644 --- a/comps/embeddings/langchain-mosec/embedding_mosec.py +++ b/comps/embeddings/langchain-mosec/embedding_mosec.py @@ -67,7 +67,7 @@ def embedding(input: TextDoc) -> EmbedDoc: MOSEC_EMBEDDING_ENDPOINT = os.environ.get("MOSEC_EMBEDDING_ENDPOINT", "http://127.0.0.1:8080") os.environ["OPENAI_API_BASE"] = MOSEC_EMBEDDING_ENDPOINT os.environ["OPENAI_API_KEY"] = "Dummy key" - MODEL_ID = "/root/bge-large-zh-v1.5" + MODEL_ID = "/home/user/bge-large-zh-v1.5" embeddings = MosecEmbeddings(model=MODEL_ID) print("Mosec Embedding initialized.") opea_microservices["opea_service@embedding_mosec"].start() diff --git a/comps/embeddings/langchain-mosec/mosec-docker/README.md b/comps/embeddings/langchain-mosec/mosec-docker/README.md index e7f59d616..3222a1b1e 100644 --- a/comps/embeddings/langchain-mosec/mosec-docker/README.md +++ b/comps/embeddings/langchain-mosec/mosec-docker/README.md @@ -25,13 +25,13 @@ docker run -itd -p 8000:8000 embedding:latest - Restful API by curl ```shell -curl -X POST http://127.0.0.1:8000/v1/embeddings -H "Content-Type: application/json" -d '{ "model": "/root/bge-large-zh-v1.5/", "input": "hello world"}' +curl -X POST http://127.0.0.1:8000/v1/embeddings -H "Content-Type: application/json" -d '{ "model": "/home/user/bge-large-zh-v1.5/", "input": "hello world"}' ``` - generate embedding from python ```python -DEFAULT_MODEL = "/root/bge-large-zh-v1.5/" +DEFAULT_MODEL = "/home/user/bge-large-zh-v1.5/" SERVICE_URL = "http://127.0.0.1:8000" INPUT_STR = "Hello world!" diff --git a/comps/embeddings/langchain-mosec/mosec-docker/test-embedding.py b/comps/embeddings/langchain-mosec/mosec-docker/test-embedding.py index d2d67c836..67a3939e1 100644 --- a/comps/embeddings/langchain-mosec/mosec-docker/test-embedding.py +++ b/comps/embeddings/langchain-mosec/mosec-docker/test-embedding.py @@ -4,7 +4,7 @@ from openai import Client -DEFAULT_MODEL = "/root/bge-large-zh-v1.5/" +DEFAULT_MODEL = "/home/user/bge-large-zh-v1.5/" SERVICE_URL = "http://127.0.0.1:8000" INPUT_STR = "Hello world!" diff --git a/comps/llms/text-generation/vllm-openvino/launch_model_server.sh b/comps/llms/text-generation/vllm-openvino/launch_model_server.sh index 8eef92f52..575088876 100755 --- a/comps/llms/text-generation/vllm-openvino/launch_model_server.sh +++ b/comps/llms/text-generation/vllm-openvino/launch_model_server.sh @@ -51,7 +51,7 @@ docker run -d --rm --name="vllm-openvino-server" \ -e HTTPS_PROXY=$https_proxy \ -e HTTP_PROXY=$https_proxy \ -e HF_TOKEN=${HUGGINGFACEHUB_API_TOKEN} \ - -v $HOME/.cache/huggingface:/root/.cache/huggingface \ + -v $HOME/.cache/huggingface:/home/user/.cache/huggingface \ vllm:openvino /bin/bash -c "\ cd / && \ export VLLM_CPU_KVCACHE_SPACE=50 && \ diff --git a/comps/llms/text-generation/vllm-ray/docker/Dockerfile.vllmray b/comps/llms/text-generation/vllm-ray/docker/Dockerfile.vllmray index 53e900716..fce3a4ee2 100644 --- a/comps/llms/text-generation/vllm-ray/docker/Dockerfile.vllmray +++ b/comps/llms/text-generation/vllm-ray/docker/Dockerfile.vllmray @@ -6,10 +6,10 @@ FROM vault.habana.ai/gaudi-docker/1.16.0/ubuntu22.04/habanalabs/pytorch-installe ENV LANG=en_US.UTF-8 -WORKDIR /root/vllm-ray +WORKDIR /home/user/vllm-ray # copy the source code to the package directory -COPY comps/llms/text-generation/vllm-ray /root/vllm-ray +COPY comps/llms/text-generation/vllm-ray /home/user/vllm-ray RUN pip install --upgrade-strategy eager optimum[habana] && \ pip install git+https://github.com/HabanaAI/DeepSpeed.git@1.15.1 @@ -21,7 +21,7 @@ RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/ service ssh restart ENV no_proxy=localhost,127.0.0.1 -ENV PYTHONPATH=$PYTHONPATH:/root:/root/vllm-ray +ENV PYTHONPATH=$PYTHONPATH:/root:/home/user/vllm-ray # Required by DeepSpeed ENV RAY_EXPERIMENTAL_NOSET_HABANA_VISIBLE_MODULES=1 diff --git a/comps/llms/text-generation/vllm-xft/docker/Dockerfile b/comps/llms/text-generation/vllm-xft/docker/Dockerfile index 95cd596d7..3742bcb2f 100644 --- a/comps/llms/text-generation/vllm-xft/docker/Dockerfile +++ b/comps/llms/text-generation/vllm-xft/docker/Dockerfile @@ -58,13 +58,13 @@ RUN cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/oneCCL \ RUN echo "source /usr/local/oneCCL/env/setvars.sh" >> ~/.bashrc -WORKDIR /root/ +WORKDIR /home/user/ RUN rm -rf /tmp/oneCCL RUN git clone https://github.com/intel/xFasterTransformer.git SHELL ["/bin/bash", "-c"] -WORKDIR /root/xFasterTransformer +WORKDIR /home/user/xFasterTransformer RUN git checkout ${TAG} \ && export "LD_LIBRARY_PATH=/usr/local/mklml_lnx_2019.0.5.20190502/lib:$LD_LIBRARY_PATH" \ && export "PATH=/usr/bin/python3.8:$PATH" \ @@ -75,23 +75,23 @@ RUN git checkout ${TAG} \ && pip install --no-cache-dir dist/* RUN mkdir -p /usr/local/xft/lib \ - && cp /root/xFasterTransformer/build/libxfastertransformer.so /usr/local/xft/lib \ - && cp /root/xFasterTransformer/build/libxft_comm_helper.so /usr/local/xft/lib \ - && cp -r /root/xFasterTransformer/include /usr/local/xft/ \ + && cp /home/user/xFasterTransformer/build/libxfastertransformer.so /usr/local/xft/lib \ + && cp /home/user/xFasterTransformer/build/libxft_comm_helper.so /usr/local/xft/lib \ + && cp -r /home/user/xFasterTransformer/include /usr/local/xft/ \ && mkdir -p /usr/local/include/xft/ \ && ln -s /usr/local/xft/include /usr/local/include/xft/include RUN echo "export \$(python -c 'import xfastertransformer as xft; print(xft.get_env())')" >> ~/.bashrc -COPY comps /root/comps +COPY comps /home/user/comps RUN pip install --no-cache-dir --upgrade pip && \ - pip install --no-cache-dir -r /root/comps/llms/text-generation/vllm-xft/requirements.txt + pip install --no-cache-dir -r /home/user/comps/llms/text-generation/vllm-xft/requirements.txt ENV PYTHONPATH=$PYTHONPATH:/root -RUN chmod +x /root/comps/llms/text-generation/vllm-xft/run.sh +RUN chmod +x /home/user/comps/llms/text-generation/vllm-xft/run.sh -WORKDIR /root/comps/llms/text-generation/vllm-xft/ +WORKDIR /home/user/comps/llms/text-generation/vllm-xft/ -ENTRYPOINT ["/root/comps/llms/text-generation/vllm-xft/run.sh"] +ENTRYPOINT ["/home/user/comps/llms/text-generation/vllm-xft/run.sh"] diff --git a/comps/retrievers/langchain/milvus/config.py b/comps/retrievers/langchain/milvus/config.py index dcbe167b5..b7e5ec420 100644 --- a/comps/retrievers/langchain/milvus/config.py +++ b/comps/retrievers/langchain/milvus/config.py @@ -16,4 +16,4 @@ MOSEC_EMBEDDING_ENDPOINT = os.environ.get("MOSEC_EMBEDDING_ENDPOINT", "") os.environ["OPENAI_API_BASE"] = MOSEC_EMBEDDING_ENDPOINT os.environ["OPENAI_API_KEY"] = "Dummy key" -MODEL_ID = "/root/bce-embedding-base_v1" +MODEL_ID = "/home/user/bce-embedding-base_v1"