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

[Bug]: Not able to install/compile vllm using alpine linux base image #10924

Open
1 task done
hteeyeoh opened this issue Dec 5, 2024 · 8 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@hteeyeoh
Copy link

hteeyeoh commented Dec 5, 2024

Your current environment

The output of `python collect_env.py`
Your output of `python collect_env.py` here

Model Input Dumps

No response

🐛 Describe the bug

Not able to compile/ install vllm using an alpine linux based image. Does vllm support?

RUN pip install --upgrade pip
RUN pip install Pillow==8.2.0 numpy wheel packaging ninja "setuptools>=49.4.0"

RUN git clone https://github.com/vllm-project/vllm.git && cd vllm &&
pip install -v -r requirements-cpu.txt --extra-index-url https://download.pytorch.org/whl/cpu

RUN VLLM_TARGET_DEVICE=cpu python setup.py install

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.
@hteeyeoh hteeyeoh added the bug Something isn't working label Dec 5, 2024
@jikunshang
Copy link
Contributor

can you show your install/compile error details?

There are some dependencies when building vllm-cpu, we use apt install on ubuntu. https://github.com/vllm-project/vllm/blob/main/Dockerfile.cpu#L9-L13 you need install alternative dependency on alpine linux first.

@hteeyeoh
Copy link
Author

hteeyeoh commented Dec 6, 2024

Hi @jikunshang ,
Sure here is the log and error that i have faced:
#5 [2/6] RUN apk add --update --no-cache automake gcc g++ subversion python3-dev jpeg-dev zlib-dev libjpeg rust cargo git numactl-dev
#5 CACHED

#6 [3/6] RUN pip install --upgrade pip
#6 CACHED

#7 [4/6] RUN pip install Pillow==8.2.0 numpy wheel packaging ninja "setuptools>=49.4.0" xgrammar
#7 1.104 Collecting Pillow==8.2.0
#7 1.192 Downloading Pillow-8.2.0.tar.gz (47.9 MB)
#7 1.979 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 47.9/47.9 MB 63.1 MB/s eta 0:00:00
#7 3.708 Preparing metadata (setup.py): started
#7 4.449 Preparing metadata (setup.py): finished with status 'done'
#7 4.732 Collecting numpy
#7 4.743 Downloading numpy-2.1.3-cp310-cp310-musllinux_1_1_x86_64.whl.metadata (62 kB)
#7 4.754 Requirement already satisfied: wheel in /usr/local/lib/python3.10/site-packages (0.43.0)
#7 4.797 Collecting packaging
#7 4.808 Downloading packaging-24.2-py3-none-any.whl.metadata (3.2 kB)
#7 4.869 Collecting ninja
#7 4.881 Downloading ninja-1.11.1.2-py3-none-musllinux_1_1_x86_64.whl.metadata (5.3 kB)
#7 4.890 Requirement already satisfied: setuptools>=49.4.0 in /usr/local/lib/python3.10/site-packages (65.5.1)
#7 4.930 ERROR: Could not find a version that satisfies the requirement xgrammar (from versions: none)
#7 4.956 ERROR: No matching distribution found for xgrammar
#7 ERROR: process "/bin/sh -c pip install Pillow==8.2.0 numpy wheel packaging ninja "setuptools>=49.4.0" xgrammar" did not complete successfully: exit code: 1

[4/6] RUN pip install Pillow==8.2.0 numpy wheel packaging ninja "setuptools>=49.4.0" xgrammar:
4.732 Collecting numpy
4.743 Downloading numpy-2.1.3-cp310-cp310-musllinux_1_1_x86_64.whl.metadata (62 kB)
4.754 Requirement already satisfied: wheel in /usr/local/lib/python3.10/site-packages (0.43.0)
4.797 Collecting packaging
4.808 Downloading packaging-24.2-py3-none-any.whl.metadata (3.2 kB)
4.869 Collecting ninja
4.881 Downloading ninja-1.11.1.2-py3-none-musllinux_1_1_x86_64.whl.metadata (5.3 kB)
4.890 Requirement already satisfied: setuptools>=49.4.0 in /usr/local/lib/python3.10/site-packages (65.5.1)
4.930 ERROR: Could not find a version that satisfies the requirement xgrammar (from versions: none)
4.956 ERROR: No matching distribution found for xgrammar

And this is my simple Dockerfile which to try to build vllm:

FROM python:3.10-alpine3.18

RUN apk add --update --no-cache automake gcc g++ subversion python3-dev
jpeg-dev zlib-dev libjpeg rust cargo git numactl-dev

RUN pip install --upgrade pip
RUN pip install Pillow==8.2.0 numpy wheel packaging ninja "setuptools>=49.4.0"

RUN git clone https://github.com/vllm-project/vllm.git && cd vllm &&
pip install -v -r requirements-cpu.txt --extra-index-url https://download.pytorch.org/whl/cpu

RUN VLLM_TARGET_DEVICE=cpu python setup.py install

@jikunshang
Copy link
Contributor

seems due to xgrammar compatible issue on this linux distribution. you can try to remove this in requirements-common.txt and try again

@hteeyeoh
Copy link
Author

hteeyeoh commented Dec 6, 2024

seems due to xgrammar compatible issue on this linux distribution. you can try to remove this in requirements-common.txt and try again

Sure thanks i will give a try

@hteeyeoh
Copy link
Author

hteeyeoh commented Dec 6, 2024

Still failed.
#11 465.7 Successfully built psutil opencv-python-headless numba
#11 465.7 Failed to build sentencepiece llvmlite pyarrow
#11 465.7 ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (sentencepiece, llvmlite, pyarrow)
#11 ERROR: process "/bin/sh -c git clone https://github.com/vllm-project/vllm.git && cd vllm && sed -i '/xgrammar >= 0.1.5; platform_machine == "x86_64"/d' ./requirements-common.txt && pip install -v -r requirements-cpu.txt --extra-index-url https://download.pytorch.org/whl/cpu" did not complete successfully: exit code: 1

[8/9] RUN git clone https://github.com/vllm-project/vllm.git && cd vllm && sed -i '/xgrammar >= 0.1.5; platform_machine == "x86_64"/d' ./requirements-common.txt && pip install -v -r requirements-cpu.txt --extra-index-url https://download.pytorch.org/whl/cpu:
465.7 ╰─> See above for output.
465.7
465.7 note: This error originates from a subprocess, and is likely not a problem with pip.
465.7 full command: /usr/local/bin/python /usr/local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmpchjqtt9m
465.7 cwd: /tmp/pip-install-sy_gr61i/pyarrow_a9586e4bb3064b3aaecd160614cec634
465.7 Building wheel for pyarrow (pyproject.toml): finished with status 'error'
465.7 ERROR: Failed building wheel for pyarrow
465.7 Successfully built psutil opencv-python-headless numba
465.7 Failed to build sentencepiece llvmlite pyarrow
465.7 ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (sentencepiece, llvmlite, pyarrow)


Guess i have to build pyarrow etc from source code

@hteeyeoh
Copy link
Author

hteeyeoh commented Dec 6, 2024

I have built pyarrow packages and last it bump into this error:
869.7 Failed to build llvmlite
869.7 ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (llvmlite)

Which on to compile? LLVM or llvmlite or both?
https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#building-manually

@jikunshang
Copy link
Contributor

Sorry, that's beyond my knowledge, can you use ubuntu base image instead?

@hteeyeoh
Copy link
Author

hteeyeoh commented Dec 6, 2024

Sorry, that's beyond my knowledge, can you use ubuntu base image instead?

ya we using ubuntu base image initially. But now due to its vulnerability, size etc.. So we are trying to use alpine to get rid of those concern for security scan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants