Skip to content

Commit 595d1a8

Browse files
authored
[v0.7.3][Build][Bugfix] Fix source code path to avoid reference error (#741)
Backport and sync dockerfile change #726 This patch follow vLLM, move all source code into /vllm-workspace/, and keep /workspace as workdir. [1] https://github.com/vllm-project/vllm/blob/main/docker/Dockerfile#L264C7-L264C23 [2] https://github.com/vllm-project/vllm/blob/main/docker/Dockerfile#L52 Closes: #725 Signed-off-by: MengqingCao <cmq0113@163.com>
1 parent f2e5501 commit 595d1a8

File tree

4 files changed

+15
-17
lines changed

4 files changed

+15
-17
lines changed

.github/workflows/image_openeuler.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ jobs:
8888
uses: docker/build-push-action@v6
8989
with:
9090
platforms: linux/amd64,linux/arm64
91+
# use the current repo path as the build context, ensure .git is contained
92+
context: .
9193
# only trigger when tag, branch/main push
9294
push: ${{ github.event_name == 'push' && github.repository_owner == 'vllm-project' }}
9395
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/image.yml renamed to .github/workflows/image_ubuntu.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
- 'main'
1717
- '*-dev'
1818
paths:
19-
- '.github/workflows/image.yml'
19+
- '.github/workflows/image_ubuntu.yml'
2020
- 'Dockerfile'
2121
- 'vllm_ascend/**'
2222
push:
@@ -27,13 +27,13 @@ on:
2727
tags:
2828
- 'v*'
2929
paths:
30-
- '.github/workflows/image.yml'
30+
- '.github/workflows/image_ubuntu.yml'
3131
- 'Dockerfile'
3232
- 'vllm_ascend/**'
3333
jobs:
3434

3535
build:
36-
name: vllm-ascend image
36+
name: vllm-ascend Ubuntu image
3737
runs-on: ubuntu-latest
3838

3939
steps:
@@ -72,9 +72,6 @@ jobs:
7272

7373
- name: Build - Set up QEMU
7474
uses: docker/setup-qemu-action@v3
75-
# TODO(yikun): remove this after https://github.com/docker/setup-qemu-action/issues/198 resolved
76-
with:
77-
image: tonistiigi/binfmt:qemu-v7.0.0-28
7875

7976
- name: Build - Set up Docker Buildx
8077
uses: docker/setup-buildx-action@v3
@@ -91,12 +88,11 @@ jobs:
9188
uses: docker/build-push-action@v6
9289
with:
9390
platforms: linux/amd64,linux/arm64
94-
cache-from: type=gha
95-
cache-to: type=gha,mode=max
91+
# use the current repo path as the build context, ensure .git is contained
9692
context: .
9793
# only trigger when tag, branch/main push
9894
push: ${{ github.event_name == 'push' && github.repository_owner == 'vllm-project' }}
9995
labels: ${{ steps.meta.outputs.labels }}
10096
tags: ${{ steps.meta.outputs.tags }}
10197
build-args: |
102-
PIP_INDEX_URL=https://pypi.org/simple
98+
PIP_INDEX_URL=https://pypi.org/simple

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@ RUN apt-get update -y && \
2929

3030
WORKDIR /workspace
3131

32-
COPY . /workspace/vllm-ascend/
32+
COPY . /vllm-workspace/vllm-ascend/
3333

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

3636
# Install vLLM
3737
ARG VLLM_REPO=https://github.com/vllm-project/vllm.git
3838
ARG VLLM_TAG=v0.7.3
39-
RUN git clone --depth 1 $VLLM_REPO --branch $VLLM_TAG /workspace/vllm
40-
RUN VLLM_TARGET_DEVICE="empty" python3 -m pip install -e /workspace/vllm/ --extra-index https://download.pytorch.org/whl/cpu/ && \
39+
RUN git clone --depth 1 $VLLM_REPO --branch $VLLM_TAG /vllm-workspace/vllm
40+
RUN VLLM_TARGET_DEVICE="empty" python3 -m pip install -e /vllm-workspace/vllm/ --extra-index https://download.pytorch.org/whl/cpu/ && \
4141
python3 -m pip cache purge
4242

4343
# Install vllm-ascend
44-
RUN python3 -m pip install -e /workspace/vllm-ascend/ --extra-index https://download.pytorch.org/whl/cpu/ && \
44+
RUN python3 -m pip install -e /vllm-workspace/vllm-ascend/ --extra-index https://download.pytorch.org/whl/cpu/ && \
4545
python3 -m pip cache purge
4646

4747
# Install modelscope (for fast download) and ray (for multinode)

Dockerfile.openEuler

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ RUN yum update -y && \
2525

2626
WORKDIR /workspace
2727

28-
COPY . /workspace/vllm-ascend/
28+
COPY . /vllm-workspace/vllm-ascend/
2929

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

3232
# Install vLLM
3333
ARG VLLM_REPO=https://github.com/vllm-project/vllm.git
3434
ARG VLLM_TAG=v0.7.3
35-
RUN git clone --depth 1 $VLLM_REPO --branch $VLLM_TAG /workspace/vllm
36-
RUN VLLM_TARGET_DEVICE="empty" python3 -m pip install -e /workspace/vllm/ --extra-index https://download.pytorch.org/whl/cpu/ && \
35+
RUN git clone --depth 1 $VLLM_REPO --branch $VLLM_TAG /vllm-workspace/vllm
36+
RUN VLLM_TARGET_DEVICE="empty" python3 -m pip install -e /vllm-workspace/vllm/ --extra-index https://download.pytorch.org/whl/cpu/ && \
3737
python3 -m pip cache purge
3838

3939
# Install vllm-ascend
40-
RUN python3 -m pip install -e /workspace/vllm-ascend/ --extra-index https://download.pytorch.org/whl/cpu/ && \
40+
RUN python3 -m pip install -e /vllm-workspace/vllm-ascend/ --extra-index https://download.pytorch.org/whl/cpu/ && \
4141
python3 -m pip cache purge
4242

4343
# Install modelscope (for fast download) and ray (for multinode)

0 commit comments

Comments
 (0)