Skip to content

Commit

Permalink
Merge pull request vllm-project#7 from ilya-lavrenov/update-docker-file
Browse files Browse the repository at this point in the history
Updated OpenVINO version in dockerfile
  • Loading branch information
ilya-lavrenov authored Mar 21, 2024
2 parents 658407a + 333289d commit 9a36d7b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
14 changes: 11 additions & 3 deletions Dockerfile.openvino
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,21 @@ RUN apt-get update -y && \
WORKDIR /workspace

# build and install OpenVINO
RUN git clone --recurse-submodules -b pytorch_module_extension https://github.com/slyalin/openvino.git
RUN git clone https://github.com/openvinotoolkit/openvino.git && \
cd /workspace/openvino && \
git checkout 326200598ae346eab72460b65f2fa748b22e8f74 && \
git submodule update --init -- /workspace/openvino/thirdparty/xbyak \
/workspace/openvino/thirdparty/pugixml \
/workspace/openvino/thirdparty/open_model_zoo \
/workspace/openvino/src/plugins/intel_cpu/thirdparty/mlas \
/workspace/openvino/src/plugins/intel_cpu/thirdparty/onednn && \
cd -
RUN /workspace/openvino/install_build_dependencies.sh
RUN cmake -DCPACK_GENERATOR=DEB -DENABLE_PYTHON=ON -DENABLE_PYTHON_PACKAGING=ON -DENABLE_CPPLINT=OFF \
RUN python3 -m pip install -r /workspace/openvino/src/bindings/python/wheel/requirements-dev.txt
RUN cmake -DCPACK_GENERATOR=DEB -DENABLE_PYTHON=ON -DENABLE_PYTHON_PACKAGING=ON -DENABLE_CPPLINT=OFF -DENABLE_SAMPLES=OFF \
-DENABLE_INTEL_GPU=OFF -DENABLE_TEMPLATE=OFF -DENABLE_AUTO=OFF -DENABLE_HETERO=OFF -DENABLE_AUTO_BATCH=OFF \
-DENABLE_OV_TF_FRONTEND=OFF -DENABLE_OV_ONNX_FRONTEND=OFF -DENABLE_OV_TF_LITE_FRONTEND=OFF -DENABLE_OV_PADDLE_FRONTEND=OFF \
-S /workspace/openvino -B /workspace/openvino_build
RUN python3 -m pip install -r /workspace/openvino/src/bindings/python/wheel/requirements-dev.txt
RUN cmake --build /workspace/openvino_build --parallel 8
RUN cmake -P /workspace/openvino_build/cmake_install.cmake

Expand Down
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(
model_name,
torch_dtype=torch_dtype,
trust_remote_code=True,
).cuda()
)
if tokenizer_name is None:
tokenizer_name = model_name
self.tokenizer = get_tokenizer(tokenizer_name, trust_remote_code=True)
Expand All @@ -70,7 +70,7 @@ def generate(
for prompt in prompts:
input_ids = self.tokenizer(prompt, return_tensors="pt").input_ids
output_ids = self.model.generate(
input_ids.cuda(),
input_ids,
use_cache=True,
**kwargs,
)
Expand Down Expand Up @@ -126,7 +126,7 @@ def generate_greedy_logprobs(
for prompt in prompts:
input_ids = self.tokenizer(prompt, return_tensors="pt").input_ids
output = self.model.generate(
input_ids.cuda(),
input_ids,
use_cache=True,
do_sample=False,
max_new_tokens=max_tokens,
Expand Down

0 comments on commit 9a36d7b

Please sign in to comment.