Skip to content

Commit

Permalink
optional vllm microservice container build (#266)
Browse files Browse the repository at this point in the history
Signed-off-by: Abolfazl Shahbazi <abolfazl.shahbazi@intel.com>
  • Loading branch information
ashahba authored Jul 4, 2024
1 parent 33f37ce commit 9637553
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

FROM langchain/langchain:latest

ARG ARCH="cpu" # Set this to "cpu" or "gpu"

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

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

ENV PYTHONPATH=$PYTHONPATH:/home/user

Expand Down

0 comments on commit 9637553

Please sign in to comment.