diff --git a/.github/workflows/image_openeuler.yml b/.github/workflows/image_openeuler.yml index 320824b..4654d4b 100644 --- a/.github/workflows/image_openeuler.yml +++ b/.github/workflows/image_openeuler.yml @@ -93,7 +93,5 @@ jobs: labels: ${{ steps.meta.outputs.labels }} tags: ${{ steps.meta.outputs.tags }} file: Dockerfile.openEuler - # TODO: support and enable custom ops build for openEuler build-args: | PIP_INDEX_URL=https://pypi.org/simple - COMPILE_CUSTOM_KERNELS=0 diff --git a/Dockerfile.openEuler b/Dockerfile.openEuler index cce429c..538d533 100644 --- a/Dockerfile.openEuler +++ b/Dockerfile.openEuler @@ -23,9 +23,8 @@ ARG COMPILE_CUSTOM_KERNELS=1 ENV COMPILE_CUSTOM_KERNELS=${COMPILE_CUSTOM_KERNELS} RUN yum update -y && \ - yum install -y python3-pip git vim wget net-tools && \ - rm -rf /var/cache/yum &&\ - rm -rf /tmp/* + yum install -y python3-pip git vim wget net-tools gcc gcc-c++ make cmake numactl-devel && \ + rm -rf /var/cache/yum RUN pip config set global.index-url ${PIP_INDEX_URL} @@ -35,21 +34,23 @@ COPY . /workspace/vllm-ascend/ # Install vLLM ARG VLLM_REPO=https://github.com/vllm-project/vllm.git -ARG VLLM_TAG=main +ARG VLLM_TAG=v0.8.4 RUN git clone --depth 1 $VLLM_REPO --branch $VLLM_TAG /workspace/vllm -RUN VLLM_TARGET_DEVICE="empty" python3 -m pip install /workspace/vllm/ --extra-index https://download.pytorch.org/whl/cpu/ # In x86, triton will be installed by vllm. But in Ascend, triton doesn't work correctly. we need to uninstall it. -RUN python3 -m pip uninstall -y triton +RUN VLLM_TARGET_DEVICE="empty" python3 -m pip install -e /workspace/vllm/ --extra-index https://download.pytorch.org/whl/cpu/ && \ + python3 -m pip uninstall -y triton && \ + python3 -m pip cache purge # Install vllm-ascend RUN source /usr/local/Ascend/ascend-toolkit/set_env.sh && \ source /usr/local/Ascend/nnal/atb/set_env.sh && \ - export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/`uname -i`-linux/devlib:$LD_LIBRARY_PATH && \ - export LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/lib64:$LIBRARY_PATH && \ - python3 -m pip install -v /workspace/vllm-ascend/ --extra-index https://download.pytorch.org/whl/cpu/ + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/`uname -i`-linux/devlib && \ + python3 -m pip install -v -e /workspace/vllm-ascend/ --extra-index https://download.pytorch.org/whl/cpu/ && \ + python3 -m pip cache purge # Install modelscope (for fast download) and ray (for multinode) -RUN python3 -m pip install modelscope ray +RUN python3 -m pip install modelscope ray && \ + python3 -m pip cache purge -CMD ["/bin/bash"] +CMD ["/bin/bash"] \ No newline at end of file