Skip to content

Commit 0458443

Browse files
authored
update torch cpu installation (#681)
Signed-off-by: chensuyue <[email protected]>
1 parent ca94c60 commit 0458443

File tree

10 files changed

+21
-13
lines changed

10 files changed

+21
-13
lines changed

.github/workflows/docker/compose/dataprep-compose-cd.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ services:
1919
build:
2020
dockerfile: comps/dataprep/pinecone/langchain/Dockerfile
2121
image: ${REGISTRY:-opea}/dataprep-pinecone:${TAG:-latest}
22-
dataprep-redis: #need to rename
22+
dataprep-multimodal-redis:
2323
build:
2424
dockerfile: comps/dataprep/multimodal/redis/langchain/Dockerfile
25-
image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
26-
dataprep-vdmsxx: #need to rename
25+
image: ${REGISTRY:-opea}/dataprep-multimodal-redis:${TAG:-latest}
26+
dataprep-vdms:
2727
build:
2828
dockerfile: comps/dataprep/vdms/langchain/Dockerfile
2929
image: ${REGISTRY:-opea}/dataprep-vdms:${TAG:-latest}

.github/workflows/docker/compose/dataprep-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ services:
1717
build:
1818
dockerfile: comps/dataprep/redis/langchain_ray/Dockerfile
1919
image: ${REGISTRY:-opea}/dataprep-on-ray-redis:${TAG:-latest}
20-
dataprep-vdms:
20+
dataprep-multimodal-vdms:
2121
build:
2222
dockerfile: comps/dataprep/vdms/multimodal_langchain/Dockerfile
23-
image: ${REGISTRY:-opea}/dataprep-vdms:${TAG:-latest}
23+
image: ${REGISTRY:-opea}/dataprep-multimodal-vdms:${TAG:-latest}

.github/workflows/docker/compose/embeddings-compose-cd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ services:
2222
build:
2323
dockerfile: comps/embeddings/multimodal/bridgetower/Dockerfile.intel_hpu
2424
image: ${REGISTRY:-opea}/bridgetower-embedder-gaudi:${TAG:-latest}
25-
embedding-multimodalxx: #need to rename
25+
embedding-multimodal:
2626
build:
2727
dockerfile: comps/embeddings/multimodal/multimodal_langchain/Dockerfile
2828
image: ${REGISTRY:-opea}/embedding-multimodal:${TAG:-latest}

.github/workflows/docker/compose/embeddings-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ services:
88
build:
99
dockerfile: comps/embeddings/tei/langchain/Dockerfile
1010
image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
11-
embedding-multimodal:
11+
embedding-multimodal-clip:
1212
build:
1313
dockerfile: comps/embeddings/multimodal_clip/Dockerfile
14-
image: ${REGISTRY:-opea}/embedding-multimodal:${TAG:-latest}
14+
image: ${REGISTRY:-opea}/embedding-multimodal-clip:${TAG:-latest}

.github/workflows/docker/compose/llms-compose-cd.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ services:
1111
context: vllm-openvino
1212
dockerfile: Dockerfile.openvino
1313
image: ${REGISTRY:-opea}/vllm-openvino:${TAG:-latest}
14-
llm-nativexx: #need to rename
14+
llm-eval:
1515
build:
1616
dockerfile: comps/llms/utils/lm-eval/Dockerfile
17-
image: ${REGISTRY:-opea}/llm-native:${TAG:-latest}
17+
image: ${REGISTRY:-opea}/llm-eval:${TAG:-latest}
1818
llm-vllm-llamaindex:
1919
build:
2020
dockerfile: comps/llms/text-generation/vllm/llama_index/Dockerfile

comps/llms/summarization/tgi/langchain/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
FROM python:3.11-slim
55

6+
ARG ARCH="cpu"
7+
68
RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \
79
libgl1-mesa-glx \
810
libjemalloc-dev
@@ -16,6 +18,7 @@ USER user
1618
COPY comps /home/user/comps
1719

1820
RUN pip install --no-cache-dir --upgrade pip && \
21+
if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \
1922
pip install --no-cache-dir -r /home/user/comps/llms/summarization/tgi/langchain/requirements.txt
2023

2124
ENV PYTHONPATH=$PYTHONPATH:/home/user

comps/reranks/mosec/langchain/dependency/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN apt update && apt install -y python3 python3-pip
1515

1616
RUN pip3 install torch==2.2.2 torchvision --trusted-host download.pytorch.org --index-url https://download.pytorch.org/whl/cpu
1717
RUN pip3 install intel-extension-for-pytorch==2.2.0
18-
RUN pip3 install transformers sentence-transformers
18+
RUN pip3 install transformers sentence-transformers==3.0.1
1919
RUN pip3 install llmspec mosec
2020

2121
RUN cd /home/user/ && export HF_ENDPOINT=https://hf-mirror.com && huggingface-cli download --resume-download BAAI/bge-reranker-base --local-dir /home/user/bge-reranker-large

comps/retrievers/pgvector/langchain/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
FROM python:3.11-slim
55

6+
ARG ARCH="cpu"
7+
68
RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \
79
libgl1-mesa-glx \
810
libjemalloc-dev
@@ -16,6 +18,7 @@ COPY comps /home/user/comps
1618
USER user
1719

1820
RUN pip install --no-cache-dir --upgrade pip && \
21+
if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \
1922
pip install --no-cache-dir -r /home/user/comps/retrievers/pgvector/langchain/requirements.txt
2023

2124
ENV PYTHONPATH=$PYTHONPATH:/home/user

comps/vectorstores/pathway/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ FROM pathwaycom/pathway:0.13.2-slim
55

66
ENV DOCKER_BUILDKIT=1
77
ENV PYTHONUNBUFFERED=1
8+
ARG ARCH="cpu"
89

910
RUN apt-get update && apt-get install -y \
1011
poppler-utils \
@@ -16,7 +17,8 @@ WORKDIR /app
1617

1718
COPY requirements.txt /app/
1819

19-
RUN pip install --no-cache-dir -r requirements.txt
20+
RUN if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \
21+
pip install --no-cache-dir -r requirements.txt
2022

2123
COPY vectorstore_pathway.py /app/
2224

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
langchain_openai
22
pathway[xpack-llm] >= 0.14.1
3-
sentence_transformers
3+
sentence-transformers
44
unstructured[all-docs] >= 0.10.28,<0.15

0 commit comments

Comments
 (0)