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

[Build] Fix dockerfile for 0.7.3 #157

Merged
merged 1 commit into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ jobs:
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
file: ./Dockerfile.CI
# only trigger when tag, branch/main push
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
9 changes: 2 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ARG PIP_INDEX_URL="https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update -y && \
apt-get install -y python3-pip git vim && \
apt-get install -y python3-pip git vim gcc g++ cmake libnuma-dev kmod && \
rm -rf /var/cache/apt/* && \
rm -rf /var/lib/apt/lists/*

Expand All @@ -33,12 +33,7 @@ COPY . /workspace/vllm-ascend/

RUN pip config set global.index-url ${PIP_INDEX_URL}

# Install vLLM main
ARG VLLM_REPO=https://github.com/vllm-project/vllm.git
RUN git clone --depth 1 $VLLM_REPO /workspace/vllm
RUN VLLM_TARGET_DEVICE="empty" python3 -m pip install /workspace/vllm/

# Install vllm-ascend main
# Install vllm and vllm-ascend
RUN python3 -m pip install /workspace/vllm-ascend/ --extra-index https://download.pytorch.org/whl/cpu/

# Install modelscope
Expand Down
52 changes: 52 additions & 0 deletions Dockerfile.CI
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#
# Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved.
# This file is a part of the vllm-ascend project.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This Dockerfile is used to build the vllm-ascend image in github action CI to
# avoid cross compilation issues. Use `Dockerfile` instead if you want to build
# the image locally.

FROM quay.io/ascend/cann:8.0.0-910b-ubuntu22.04-py3.10

ARG PIP_INDEX_URL="https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"

# Define environments
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update -y && \
apt-get install -y python3-pip git vim && \
rm -rf /var/cache/apt/* && \
rm -rf /var/lib/apt/lists/*

WORKDIR /workspace

COPY . /workspace/vllm-ascend/

RUN pip config set global.index-url ${PIP_INDEX_URL}

# Install vLLM
ARG VLLM_REPO=https://github.com/vllm-project/vllm.git
RUN git clone --depth 1 --branch v0.7.3 $VLLM_REPO /workspace/vllm
RUN VLLM_TARGET_DEVICE="empty" python3 -m pip install /workspace/vllm/

# Install vllm-ascend
RUN sed -i '/vllm==0.7.3/d' /workspace/vllm-ascend/requirements.txt
RUN sed -i '/[[:space:]]*"vllm==0.7.3",/d' /workspace/vllm-ascend/pyproject.toml
RUN python3 -m pip install /workspace/vllm-ascend/ --extra-index https://download.pytorch.org/whl/cpu/

# Install modelscope
RUN python3 -m pip install modelscope

CMD ["/bin/bash"]
7 changes: 3 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,14 @@
# the branch of vllm, used in vllm clone
# - main branch: 'main'
# - vX.Y.Z branch: 'vX.Y.Z'
'vllm_version': 'main',
'vllm_version': 'v0.7.3rc1',
# the branch of vllm-ascend, used in vllm-ascend clone and image tag
# - main branch: 'main'
# - vX.Y.Z branch: latest vllm-ascend release tag
'vllm_ascend_version': 'main',
'vllm_ascend_version': 'v0.7.3rc1',
# the newest release version of vllm-ascend and matched vLLM, used in pip install.
# This value should be updated when cut down release.
'pip_vllm_ascend_version': "v0.7.3rc1",
'pip_vllm_version': "v0.7.3",
'pip_vllm_ascend_version': "0.7.3rc1",
}

# Add any paths that contain templates here, relative to this directory.
Expand Down
3 changes: 2 additions & 1 deletion docs/source/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ wget https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/CANN/CANN%208.0.0/Ascen
chmod +x ./Ascend-cann-toolkit_8.0.0_linux-aarch64.run
./Ascend-cann-toolkit_8.0.0_linux-aarch64.run --full

source /usr/local/Ascend/ascend-toolkit/set_env.sh

wget https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/CANN/CANN%208.0.0/Ascend-cann-kernels-910b_8.0.0_linux-aarch64.run
chmod +x ./Ascend-cann-kernels-910b_8.0.0_linux-aarch64.run
./Ascend-cann-kernels-910b_8.0.0_linux-aarch64.run --install
Expand All @@ -89,7 +91,6 @@ wget https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/CANN/CANN%208.0.0/Ascen
chmod +x. /Ascend-cann-nnal_8.0.0_linux-aarch64.run
./Ascend-cann-nnal_8.0.0_linux-aarch64.run --install

source /usr/local/Ascend/ascend-toolkit/set_env.sh
source /usr/local/Ascend/nnal/atb/set_env.sh
```

Expand Down