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

[Installation]: Unable to build docker image using Dockerfile.openvino #6769

Closed
zahidulhaque opened this issue Jul 25, 2024 · 3 comments · Fixed by #6948
Closed

[Installation]: Unable to build docker image using Dockerfile.openvino #6769

zahidulhaque opened this issue Jul 25, 2024 · 3 comments · Fixed by #6948
Labels
installation Installation problems

Comments

@zahidulhaque
Copy link

Your current environment

(base) user@zahid:~/vllm$ python collect_env.py
Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.2 LTS (x86_64)
GCC version: Could not collect
Clang version: Could not collect
CMake version: version 3.30.1
Libc version: glibc-2.35

Python version: 3.12.1 | packaged by Anaconda, Inc. | (main, Jan 19 2024, 15:51:05) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.15.0-1026-intel-iotg-x86_64-with-glibc2.35
Is CUDA available: N/A
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A

CPU:
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Address sizes:                   46 bits physical, 57 bits virtual
Byte Order:                      Little Endian
CPU(s):                          128
On-line CPU(s) list:             0-127
Vendor ID:                       GenuineIntel
Model name:                      Intel(R) Xeon(R) Gold 6338N CPU @ 2.20GHz
CPU family:                      6
Model:                           106
Thread(s) per core:              2
Core(s) per socket:              32
Socket(s):                       2
Stepping:                        6
CPU max MHz:                     3500.0000
CPU min MHz:                     800.0000
BogoMIPS:                        4400.00
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid fsrm md_clear pconfig flush_l1d arch_capabilities
Virtualization:                  VT-x
L1d cache:                       3 MiB (64 instances)
L1i cache:                       2 MiB (64 instances)
L2 cache:                        80 MiB (64 instances)
L3 cache:                        96 MiB (2 instances)
NUMA node(s):                    2
NUMA node0 CPU(s):               0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126
NUMA node1 CPU(s):               1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Mmio stale data:   Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Retbleed:          Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected

Versions of relevant libraries:
[pip3] numpy==1.26.4
[conda] numpy                     1.26.4                   pypi_0    pypi
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: N/A
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
Could not collect

How you are installing vllm

Tried building vllm:openvino image using Dockerfile.openvino. However, the docker image build is failing with below error.

docker build -t vllm:openvino -f Dockerfile.openvino .

Below is the docker build error:


[ 3/12] WORKDIR /workspace 0.0s
[ 4/12] COPY requirements-build.txt /workspace/vllm/ 0.0s
[ 5/12] COPY requirements-common.txt /workspace/vllm/ 0.0s
[ 6/12] COPY requirements-openvino.txt /workspace/vllm/ 0.0s
[ 7/12] COPY vllm/ /workspace/vllm/vllm 0.1s
[ 8/12] COPY setup.py /workspace/vllm/ 0.0s
ERROR [ 9/12] RUN PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" python3 -m pip install -r /workspace/ 21.9s

[ 9/12] RUN PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" python3 -m pip install -r /workspace/vllm/requirements-build.txt:
1.698 Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cpu
3.670 Collecting cmake>=3.21
3.779 Downloading cmake-3.30.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (26.9 MB)
6.573 Collecting ninja
6.589 Downloading ninja-1.11.1.1-py2.py3-none-manylinux1_x86_64.manylinux_2_5_x86_64.whl (307 kB)
7.599 Collecting packaging
7.612 Downloading packaging-24.1-py3-none-any.whl (53 kB)
9.064 Collecting setuptools>=49.4.0
9.077 Downloading setuptools-71.1.0-py3-none-any.whl (2.3 MB)
11.10 Collecting torch==2.3.1
11.11 Downloading https://download.pytorch.org/whl/cpu/torch-2.3.1%2Bcpu-cp38-cp38-linux_x86_64.whl (190.4 MB)
20.24 Requirement already satisfied: wheel in /usr/lib/python3/dist-packages (from -r /workspace/vllm/requirements-build.txt (line 7)) (0.34.2)
21.21 Collecting networkx
21.22 Downloading https://download.pytorch.org/whl/networkx-3.2.1-py3-none-any.whl (1.6 MB)
21.78 ERROR: Package 'networkx' requires a different Python: 3.8.10 not in '>=3.9'

Dockerfile.openvino:19

17 |
18 | # install build requirements
19 | >>> RUN PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" python3 -m pip install -r /workspace/vllm/requirements-build.txt
20 | # build vLLM with OpenVINO backend
21 | RUN PIP_PRE=1 PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu https://storage.openvinotoolkit.org/simple/wheels/nightly/" VLLM_TARGET_DEVICE="openvino" python3 -m pip install /workspace/vllm/

ERROR: failed to solve: process "/bin/sh -c PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu\" python3 -m pip install -r /workspace/vllm/requirements-build.txt" did not complete successfully: exit code: 1


The build was working properly until last week, but issues began arising starting from this commit: 1689219.

[CI/Build] Build on Ubuntu 20.04 instead of 22.04 (#6517)

@zahidulhaque zahidulhaque added the installation Installation problems label Jul 25, 2024
@slyalin
Copy link

slyalin commented Jul 25, 2024

Do we have a kind of integration test for Docker images that could show that #6517 broke OpenVINO docker image functionality?

@zahidulhaque
Copy link
Author

Yes, when I reset to the previous commit, I can build and spawn the container.

(base) user@zahid:~$ bash test_llms_text-generation_vllm-openvino.sh
+++ dirname test_llms_text-generation_vllm-openvino.sh
++ cd .
++ pwd

  • WORKPATH=/home/zahid
  • port=8123
  • HF_CACHE_DIR=/home/zahid/.cache/huggingface
  • DOCKER_IMAGE=vllm:openvino
  • CONTAINER_NAME=vllm-openvino-container
  • main
  • build_container
  • cd /home/zahid
  • git clone https://github.com/vllm-project/vllm.git vllm-openvino
    Cloning into 'vllm-openvino'...
    remote: Enumerating objects: 25680, done.
    remote: Counting objects: 100% (7755/7755), done.
    remote: Compressing objects: 100% (885/885), done.
    remote: Total 25680 (delta 7320), reused 6874 (delta 6870), pack-reused 17925
    Receiving objects: 100% (25680/25680), 22.49 MiB | 11.76 MiB/s, done.
    Resolving deltas: 100% (19471/19471), done.
  • cd ./vllm-openvino/
    + git reset --hard 4ffffcc
    HEAD is now at 4ffffcc [Kernel] Implement fallback for FP8 channelwise using torch._scaled_mm ([Kernel] Implement fallback for FP8 channelwise using torch._scaled_mm #6552)
  • docker build -t vllm:openvino -f Dockerfile.openvino .
    [+] Building 1.3s (17/17) FINISHED docker:default
    => [internal] load build definition from Dockerfile.openvino 0.0s
    => => transferring dockerfile: 1.00kB 0.0s
    => [internal] load metadata for docker.io/library/ubuntu:22.04 1.2s
    => [internal] load .dockerignore 0.0s
    => => transferring context: 50B 0.0s
    => [internal] load build context 0.1s
    => => transferring context: 3.70MB 0.1s
    => [ 1/12] FROM docker.io/library/ubuntu:22.04@sha256:340d9b015b194dc6e2a13938944e0d016e57b9679963fdeb9ce021daac430221 0.0s
    => CACHED [ 2/12] RUN apt-get update -y && apt-get install -y python3-pip git 0.0s
    => CACHED [ 3/12] WORKDIR /workspace 0.0s
    => CACHED [ 4/12] COPY requirements-build.txt /workspace/vllm/ 0.0s
    => CACHED [ 5/12] COPY requirements-common.txt /workspace/vllm/ 0.0s
    => CACHED [ 6/12] COPY requirements-openvino.txt /workspace/vllm/ 0.0s
    => CACHED [ 7/12] COPY vllm/ /workspace/vllm/vllm 0.0s
    => CACHED [ 8/12] COPY setup.py /workspace/vllm/ 0.0s
    => CACHED [ 9/12] RUN PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" python3 -m pip install -r /workspace/ 0.0s
    => CACHED [10/12] RUN PIP_PRE=1 PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu https://storage.openvinotool 0.0s
    => CACHED [11/12] COPY examples/ /workspace/vllm/examples 0.0s
    => CACHED [12/12] COPY benchmarks/ /workspace/vllm/benchmarks 0.0s
    => exporting to image 0.0s
    => => exporting layers 0.0s
    => => writing image sha256:0cc5cf7e236186fe069b0e6c753caef6523f845af3f005fef5e805574e8d1451 0.0s
    => => naming to docker.io/library/vllm:openvino 0.0s
  • cd /home/zahid
  • rm -rf vllm-openvino
  • start_container
  • docker run -d --rm --name=vllm-openvino-container -p 8123:8123 --ipc=host -v /home/zahid/.cache/huggingface:/root/.cache/huggingface vllm:openvino /bin/bash -c ' cd / && export VLLM_CPU_KVCACHE_SPACE=50 && python3 -m vllm.entrypoints.openai.api_server --model "Intel/neural-chat-7b-v3-3" --host 0.0.0.0 --port 8123'
    e641273bb30c748d9ba306edd31495c2cc25184764dec352993174bdf298ca3a
  • sleep 300s
  • docker logs vllm-openvino-container
  • grep -q 'Uvicorn running on' /tmp/vllm-openvino-container.log
  • echo 'OpenAI server running on http://localhost:8123'
    OpenAI server running on http://localhost:8123
  • sleep 10
  • test_api_endpoint v1/models 200
  • local endpoint=v1/models
  • local expected_status=200
  • test v1/models = v1/completions
    ++ curl http://localhost:8123/v1/models --write-out '%{http_code}' --silent --output /dev/null
  • local response=200
  • [[ 200 -eq 200 ]]
  • echo 'PASS: v1/models returned expected status code: 200'
    PASS: v1/models returned expected status code: 200
  • test_api_endpoint v1/completions 200
  • local endpoint=v1/completions
  • local expected_status=200
  • test v1/completions = v1/completions
    ++ curl http://localhost:8123/v1/completions -H 'Content-Type: application/json' -d '{
    "model": "Intel/neural-chat-7b-v3-3",
    "prompt": "What is the key advantage of Openvino framework",
    "max_tokens": 300,
    "temperature": 0.7
    }' --write-out '%{http_code}' --silent --output /dev/null
  • local response=200
  • [[ 200 -eq 200 ]]
  • echo 'PASS: v1/completions returned expected status code: 200'
    PASS: v1/completions returned expected status code: 200
  • cleanup

@WoosukKwon
Copy link
Collaborator

cc @ilya-lavrenov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation Installation problems
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants