Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
a2c71c54
Unverified
Commit
a2c71c54
authored
Oct 17, 2024
by
Daniele
Committed by
GitHub
Oct 17, 2024
Browse files
[CI/Build] remove .github from .dockerignore, add dirty repo check (#9375)
parent
81ede99c
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
54 additions
and
17 deletions
+54
-17
.buildkite/release-pipeline.yaml
.buildkite/release-pipeline.yaml
+2
-2
.dockerignore
.dockerignore
+0
-1
.github/workflows/scripts/build.sh
.github/workflows/scripts/build.sh
+4
-0
Dockerfile
Dockerfile
+3
-1
Dockerfile.cpu
Dockerfile.cpu
+4
-1
Dockerfile.neuron
Dockerfile.neuron
+7
-7
Dockerfile.openvino
Dockerfile.openvino
+3
-0
Dockerfile.ppc64le
Dockerfile.ppc64le
+3
-0
Dockerfile.rocm
Dockerfile.rocm
+3
-0
Dockerfile.tpu
Dockerfile.tpu
+7
-4
Dockerfile.xpu
Dockerfile.xpu
+4
-1
tools/check_repo.sh
tools/check_repo.sh
+14
-0
No files found.
.buildkite/release-pipeline.yaml
View file @
a2c71c54
...
@@ -3,7 +3,7 @@ steps:
...
@@ -3,7 +3,7 @@ steps:
agents
:
agents
:
queue
:
cpu_queue
queue
:
cpu_queue
commands
:
commands
:
-
"
DOCKER_BUILDKIT=1
docker
build
--build-arg
max_jobs=16
--build-arg
USE_SCCACHE=1
--build-arg
CUDA_VERSION=12.1.0
--tag
vllm-ci:build-image
--target
build
--progress
plain
."
-
"
DOCKER_BUILDKIT=1
docker
build
--build-arg
max_jobs=16
--build-arg
USE_SCCACHE=1
--build-arg
GIT_REPO_CHECK=1
--build-arg
CUDA_VERSION=12.1.0
--tag
vllm-ci:build-image
--target
build
--progress
plain
."
-
"
mkdir
artifacts"
-
"
mkdir
artifacts"
-
"
docker
run
--rm
-v
$(pwd)/artifacts:/artifacts_host
vllm-ci:build-image
bash
-c
'cp
-r
dist
/artifacts_host
&&
chmod
-R
a+rw
/artifacts_host'"
-
"
docker
run
--rm
-v
$(pwd)/artifacts:/artifacts_host
vllm-ci:build-image
bash
-c
'cp
-r
dist
/artifacts_host
&&
chmod
-R
a+rw
/artifacts_host'"
# rename the files to change linux -> manylinux1
# rename the files to change linux -> manylinux1
...
@@ -22,7 +22,7 @@ steps:
...
@@ -22,7 +22,7 @@ steps:
agents
:
agents
:
queue
:
cpu_queue
queue
:
cpu_queue
commands
:
commands
:
-
"
DOCKER_BUILDKIT=1
docker
build
--build-arg
max_jobs=16
--build-arg
USE_SCCACHE=1
--build-arg
CUDA_VERSION=11.8.0
--tag
vllm-ci:build-image
--target
build
--progress
plain
."
-
"
DOCKER_BUILDKIT=1
docker
build
--build-arg
max_jobs=16
--build-arg
USE_SCCACHE=1
--build-arg
GIT_REPO_CHECK=1
--build-arg
CUDA_VERSION=11.8.0
--tag
vllm-ci:build-image
--target
build
--progress
plain
."
-
"
mkdir
artifacts"
-
"
mkdir
artifacts"
-
"
docker
run
--rm
-v
$(pwd)/artifacts:/artifacts_host
vllm-ci:build-image
bash
-c
'cp
-r
dist
/artifacts_host
&&
chmod
-R
a+rw
/artifacts_host'"
-
"
docker
run
--rm
-v
$(pwd)/artifacts:/artifacts_host
vllm-ci:build-image
bash
-c
'cp
-r
dist
/artifacts_host
&&
chmod
-R
a+rw
/artifacts_host'"
# rename the files to change linux -> manylinux1
# rename the files to change linux -> manylinux1
...
...
.dockerignore
View file @
a2c71c54
/.github/
/.venv
/.venv
/build
/build
dist
dist
...
...
.github/workflows/scripts/build.sh
View file @
a2c71c54
#!/bin/bash
#!/bin/bash
set
-eux
python_executable
=
python
$1
python_executable
=
python
$1
cuda_home
=
/usr/local/cuda-
$2
cuda_home
=
/usr/local/cuda-
$2
...
@@ -15,5 +16,8 @@ export MAX_JOBS=1
...
@@ -15,5 +16,8 @@ export MAX_JOBS=1
# Make sure release wheels are built for the following architectures
# Make sure release wheels are built for the following architectures
export
TORCH_CUDA_ARCH_LIST
=
"7.0 7.5 8.0 8.6 8.9 9.0+PTX"
export
TORCH_CUDA_ARCH_LIST
=
"7.0 7.5 8.0 8.6 8.9 9.0+PTX"
export
VLLM_FA_CMAKE_GPU_ARCHES
=
"80-real;90-real"
export
VLLM_FA_CMAKE_GPU_ARCHES
=
"80-real;90-real"
bash tools/check_repo.sh
# Build
# Build
$python_executable
setup.py bdist_wheel
--dist-dir
=
dist
$python_executable
setup.py bdist_wheel
--dist-dir
=
dist
Dockerfile
View file @
a2c71c54
...
@@ -70,8 +70,10 @@ COPY requirements-build.txt requirements-build.txt
...
@@ -70,8 +70,10 @@ COPY requirements-build.txt requirements-build.txt
RUN
--mount
=
type
=
cache,target
=
/root/.cache/pip
\
RUN
--mount
=
type
=
cache,target
=
/root/.cache/pip
\
python3
-m
pip
install
-r
requirements-build.txt
python3
-m
pip
install
-r
requirements-build.txt
# files and directories related to build wheels
COPY
. .
COPY
. .
ARG
GIT_REPO_CHECK=0
RUN
--mount
=
type
=
bind
,source
=
.git,target
=
.git
\
if
[
"
$GIT_REPO_CHECK
"
!=
0
]
;
then
bash tools/check_repo.sh
;
fi
# max jobs used by Ninja to build extensions
# max jobs used by Ninja to build extensions
ARG
max_jobs=2
ARG
max_jobs=2
...
...
Dockerfile.cpu
View file @
a2c71c54
...
@@ -42,7 +42,10 @@ RUN --mount=type=cache,target=/root/.cache/pip \
...
@@ -42,7 +42,10 @@ RUN --mount=type=cache,target=/root/.cache/pip \
--mount=type=bind,src=requirements-cpu.txt,target=requirements-cpu.txt \
--mount=type=bind,src=requirements-cpu.txt,target=requirements-cpu.txt \
pip install -v -r requirements-cpu.txt
pip install -v -r requirements-cpu.txt
COPY ./ ./
COPY . .
ARG GIT_REPO_CHECK=0
RUN --mount=type=bind,source=.git,target=.git \
if [ "$GIT_REPO_CHECK" != 0 ]; then bash tools/check_repo.sh ; fi
# Support for building with non-AVX512 vLLM: docker build --build-arg VLLM_CPU_DISABLE_AVX512="true" ...
# Support for building with non-AVX512 vLLM: docker build --build-arg VLLM_CPU_DISABLE_AVX512="true" ...
ARG VLLM_CPU_DISABLE_AVX512
ARG VLLM_CPU_DISABLE_AVX512
...
...
Dockerfile.neuron
View file @
a2c71c54
...
@@ -17,7 +17,7 @@ RUN apt-get update && \
...
@@ -17,7 +17,7 @@ RUN apt-get update && \
# When launching the container, mount the code directory to /app
# When launching the container, mount the code directory to /app
ARG APP_MOUNT=/app
ARG APP_MOUNT=/app
VOLUME [ ${APP_MOUNT} ]
VOLUME [ ${APP_MOUNT} ]
WORKDIR ${APP_MOUNT}
WORKDIR ${APP_MOUNT}
/vllm
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install --no-cache-dir fastapi ninja tokenizers pandas
RUN python3 -m pip install --no-cache-dir fastapi ninja tokenizers pandas
...
@@ -25,17 +25,17 @@ RUN python3 -m pip install sentencepiece transformers==4.36.2 -U
...
@@ -25,17 +25,17 @@ RUN python3 -m pip install sentencepiece transformers==4.36.2 -U
RUN python3 -m pip install transformers-neuronx --extra-index-url=https://pip.repos.neuron.amazonaws.com -U
RUN python3 -m pip install transformers-neuronx --extra-index-url=https://pip.repos.neuron.amazonaws.com -U
RUN python3 -m pip install --pre neuronx-cc==2.15.* --extra-index-url=https://pip.repos.neuron.amazonaws.com -U
RUN python3 -m pip install --pre neuronx-cc==2.15.* --extra-index-url=https://pip.repos.neuron.amazonaws.com -U
COPY . /app/vllm
COPY . .
ARG GIT_REPO_CHECK=0
RUN --mount=type=bind,source=.git,target=.git \
if [ "$GIT_REPO_CHECK" != 0 ]; then bash tools/check_repo.sh ; fi
RUN cd /app/vllm \
RUN python3 -m pip install -U \
&& python3 -m pip install -U \
cmake>=3.26 ninja packaging setuptools-scm>=8 wheel jinja2 \
cmake>=3.26 ninja packaging setuptools-scm>=8 wheel jinja2 \
-r requirements-neuron.txt
-r requirements-neuron.txt
ENV VLLM_TARGET_DEVICE neuron
ENV VLLM_TARGET_DEVICE neuron
RUN --mount=type=bind,source=.git,target=.git \
RUN --mount=type=bind,source=.git,target=.git \
cd /app/vllm \
pip install --no-build-isolation -v -e . \
&& pip install --no-build-isolation -v -e . \
&& cd ..
CMD ["/bin/bash"]
CMD ["/bin/bash"]
Dockerfile.openvino
View file @
a2c71c54
...
@@ -10,6 +10,9 @@ RUN apt-get update -y && \
...
@@ -10,6 +10,9 @@ RUN apt-get update -y && \
WORKDIR /workspace
WORKDIR /workspace
COPY . .
COPY . .
ARG GIT_REPO_CHECK=0
RUN --mount=type=bind,source=.git,target=.git \
if [ "$GIT_REPO_CHECK" != 0 ]; then bash tools/check_repo.sh ; fi
# install build requirements
# install build requirements
RUN PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" python3 -m pip install -r /workspace/vllm/requirements-build.txt
RUN PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" python3 -m pip install -r /workspace/vllm/requirements-build.txt
...
...
Dockerfile.ppc64le
View file @
a2c71c54
...
@@ -14,6 +14,9 @@ RUN micromamba install -y -n base -c https://ftp.osuosl.org/pub/open-ce/1.11.0-p
...
@@ -14,6 +14,9 @@ RUN micromamba install -y -n base -c https://ftp.osuosl.org/pub/open-ce/1.11.0-p
COPY ./ /workspace/vllm
COPY ./ /workspace/vllm
WORKDIR /workspace/vllm
WORKDIR /workspace/vllm
ARG GIT_REPO_CHECK=0
RUN --mount=type=bind,source=.git,target=.git \
if [ "$GIT_REPO_CHECK" != 0 ]; then bash tools/check_repo.sh; fi
# These packages will be in rocketce eventually
# These packages will be in rocketce eventually
RUN --mount=type=cache,target=/root/.cache/pip \
RUN --mount=type=cache,target=/root/.cache/pip \
...
...
Dockerfile.rocm
View file @
a2c71c54
...
@@ -117,6 +117,9 @@ RUN --mount=type=cache,target=${CCACHE_DIR} \
...
@@ -117,6 +117,9 @@ RUN --mount=type=cache,target=${CCACHE_DIR} \
FROM base AS final
FROM base AS final
# Import the vLLM development directory from the build context
# Import the vLLM development directory from the build context
COPY . .
COPY . .
ARG GIT_REPO_CHECK=0
RUN --mount=type=bind,source=.git,target=.git \
if [ "$GIT_REPO_CHECK" != 0 ]; then bash tools/check_repo.sh ; fi
# Package upgrades for useful functionality or to avoid dependency issues
# Package upgrades for useful functionality or to avoid dependency issues
RUN --mount=type=cache,target=/root/.cache/pip \
RUN --mount=type=cache,target=/root/.cache/pip \
...
...
Dockerfile.tpu
View file @
a2c71c54
...
@@ -2,7 +2,7 @@ ARG NIGHTLY_DATE="20240828"
...
@@ -2,7 +2,7 @@ ARG NIGHTLY_DATE="20240828"
ARG BASE_IMAGE="us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/xla:nightly_3.10_tpuvm_$NIGHTLY_DATE"
ARG BASE_IMAGE="us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/xla:nightly_3.10_tpuvm_$NIGHTLY_DATE"
FROM $BASE_IMAGE
FROM $BASE_IMAGE
WORKDIR /workspace
WORKDIR /workspace
/vllm
# Install some basic utilities
# Install some basic utilities
RUN apt-get update && apt-get install -y \
RUN apt-get update && apt-get install -y \
...
@@ -16,14 +16,17 @@ RUN --mount=type=cache,target=/root/.cache/pip \
...
@@ -16,14 +16,17 @@ RUN --mount=type=cache,target=/root/.cache/pip \
python3 -m pip install torch_xla[pallas] -f https://storage.googleapis.com/jax-releases/jax_nightly_releases.html -f https://storage.googleapis.com/jax-releases/jaxlib_nightly_releases.html
python3 -m pip install torch_xla[pallas] -f https://storage.googleapis.com/jax-releases/jax_nightly_releases.html -f https://storage.googleapis.com/jax-releases/jaxlib_nightly_releases.html
# Build vLLM.
# Build vLLM.
COPY . /workspace/vllm
COPY . .
ARG GIT_REPO_CHECK=0
RUN --mount=type=bind,source=.git,target=.git \
if [ "$GIT_REPO_CHECK" != 0 ]; then bash tools/check_repo.sh; fi
ENV VLLM_TARGET_DEVICE="tpu"
ENV VLLM_TARGET_DEVICE="tpu"
RUN --mount=type=cache,target=/root/.cache/pip \
RUN --mount=type=cache,target=/root/.cache/pip \
--mount=type=bind,source=.git,target=.git \
--mount=type=bind,source=.git,target=.git \
cd /workspace/vllm && \
python3 -m pip install \
python3 -m pip install \
cmake>=3.26 ninja packaging setuptools-scm>=8 wheel jinja2 \
cmake>=3.26 ninja packaging setuptools-scm>=8 wheel jinja2 \
-r requirements-tpu.txt
-r requirements-tpu.txt
RUN
cd /workspace/vllm &&
python3 setup.py develop
RUN python3 setup.py develop
CMD ["/bin/bash"]
CMD ["/bin/bash"]
Dockerfile.xpu
View file @
a2c71c54
...
@@ -33,7 +33,10 @@ RUN --mount=type=cache,target=/root/.cache/pip \
...
@@ -33,7 +33,10 @@ RUN --mount=type=cache,target=/root/.cache/pip \
--extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
--extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
-r requirements-xpu.txt
-r requirements-xpu.txt
COPY ./ /workspace/vllm
COPY . .
ARG GIT_REPO_CHECK
RUN --mount=type=bind,source=.git,target=.git \
if [ "$GIT_REPO_CHECK" != 0 ]; then bash tools/check_repo.sh; fi
ENV VLLM_TARGET_DEVICE=xpu
ENV VLLM_TARGET_DEVICE=xpu
...
...
tools/check_repo.sh
0 → 100644
View file @
a2c71c54
#!/bin/bash
# Checks whether the repo is clean and whether tags are available (necessary to correctly produce vllm version at build time)
if
!
git diff
--quiet
;
then
echo
"Repo is dirty"
>
&2
exit
1
fi
if
!
git describe
--tags
;
then
echo
"No tags are present. Is this a shallow clone? git fetch --unshallow --tags"
>
&2
exit
1
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment