Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update torch cpu installation #681

Merged
merged 5 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/docker/compose/dataprep-compose-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ services:
build:
dockerfile: comps/dataprep/pinecone/langchain/Dockerfile
image: ${REGISTRY:-opea}/dataprep-pinecone:${TAG:-latest}
dataprep-redis: #need to rename
dataprep-multimodal-redis:
build:
dockerfile: comps/dataprep/multimodal/redis/langchain/Dockerfile
image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
dataprep-vdmsxx: #need to rename
image: ${REGISTRY:-opea}/dataprep-multimodal-redis:${TAG:-latest}
dataprep-vdms:
build:
dockerfile: comps/dataprep/vdms/langchain/Dockerfile
image: ${REGISTRY:-opea}/dataprep-vdms:${TAG:-latest}
4 changes: 2 additions & 2 deletions .github/workflows/docker/compose/dataprep-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
build:
dockerfile: comps/dataprep/redis/langchain_ray/Dockerfile
image: ${REGISTRY:-opea}/dataprep-on-ray-redis:${TAG:-latest}
dataprep-vdms:
dataprep-multimodal-vdms:
build:
dockerfile: comps/dataprep/vdms/multimodal_langchain/Dockerfile
image: ${REGISTRY:-opea}/dataprep-vdms:${TAG:-latest}
image: ${REGISTRY:-opea}/dataprep-multimodal-vdms:${TAG:-latest}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
build:
dockerfile: comps/embeddings/multimodal/bridgetower/Dockerfile.intel_hpu
image: ${REGISTRY:-opea}/bridgetower-embedder-gaudi:${TAG:-latest}
embedding-multimodalxx: #need to rename
embedding-multimodal:
build:
dockerfile: comps/embeddings/multimodal/multimodal_langchain/Dockerfile
image: ${REGISTRY:-opea}/embedding-multimodal:${TAG:-latest}
4 changes: 2 additions & 2 deletions .github/workflows/docker/compose/embeddings-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
build:
dockerfile: comps/embeddings/tei/langchain/Dockerfile
image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
embedding-multimodal:
embedding-multimodal-clip:
build:
dockerfile: comps/embeddings/multimodal_clip/Dockerfile
image: ${REGISTRY:-opea}/embedding-multimodal:${TAG:-latest}
image: ${REGISTRY:-opea}/embedding-multimodal-clip:${TAG:-latest}
4 changes: 2 additions & 2 deletions .github/workflows/docker/compose/llms-compose-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ services:
context: vllm-openvino
dockerfile: Dockerfile.openvino
image: ${REGISTRY:-opea}/vllm-openvino:${TAG:-latest}
llm-nativexx: #need to rename
llm-eval:
build:
dockerfile: comps/llms/utils/lm-eval/Dockerfile
image: ${REGISTRY:-opea}/llm-native:${TAG:-latest}
image: ${REGISTRY:-opea}/llm-eval:${TAG:-latest}
llm-vllm-llamaindex:
build:
dockerfile: comps/llms/text-generation/vllm/llama_index/Dockerfile
Expand Down
3 changes: 3 additions & 0 deletions comps/llms/summarization/tgi/langchain/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

FROM python:3.11-slim

ARG ARCH="cpu"

RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \
libgl1-mesa-glx \
libjemalloc-dev
Expand All @@ -16,6 +18,7 @@ USER user
COPY comps /home/user/comps

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

ENV PYTHONPATH=$PYTHONPATH:/home/user
Expand Down
2 changes: 1 addition & 1 deletion comps/reranks/mosec/langchain/dependency/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN apt update && apt install -y python3 python3-pip

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

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
Expand Down
3 changes: 3 additions & 0 deletions comps/retrievers/pgvector/langchain/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

FROM python:3.11-slim

ARG ARCH="cpu"

RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \
libgl1-mesa-glx \
libjemalloc-dev
Expand All @@ -16,6 +18,7 @@ COPY comps /home/user/comps
USER user

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

ENV PYTHONPATH=$PYTHONPATH:/home/user
Expand Down
4 changes: 3 additions & 1 deletion comps/vectorstores/pathway/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ FROM pathwaycom/pathway:0.13.2-slim

ENV DOCKER_BUILDKIT=1
ENV PYTHONUNBUFFERED=1
ARG ARCH="cpu"

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

COPY requirements.txt /app/

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

COPY vectorstore_pathway.py /app/

Expand Down
2 changes: 1 addition & 1 deletion comps/vectorstores/pathway/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
langchain_openai
pathway[xpack-llm] >= 0.14.1
sentence_transformers
sentence-transformers
unstructured[all-docs] >= 0.10.28,<0.15
Loading