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
916d219d
Unverified
Commit
916d219d
authored
Jun 12, 2024
by
Kevin H. Luu
Committed by
GitHub
Jun 12, 2024
Browse files
[ci] Use sccache to build images (#5419)
Signed-off-by:
kevin
<
kevin@anyscale.com
>
parent
ea3890a5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
4 deletions
+22
-4
.buildkite/test-template-aws.j2
.buildkite/test-template-aws.j2
+1
-1
Dockerfile
Dockerfile
+20
-2
setup.py
setup.py
+1
-1
No files found.
.buildkite/test-template-aws.j2
View file @
916d219d
...
@@ -7,7 +7,7 @@ steps:
...
@@ -7,7 +7,7 @@ steps:
queue: cpu_queue
queue: cpu_queue
commands:
commands:
- "aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/q9t5s3a7"
- "aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/q9t5s3a7"
- "docker build --build-arg max_jobs=16 --tag {{ docker_image }} --target test --progress plain ."
- "docker build --build-arg max_jobs=16
--build-arg USE_SCCACHE=1
--tag {{ docker_image }} --target test --progress plain ."
- "docker push {{ docker_image }}"
- "docker push {{ docker_image }}"
env:
env:
DOCKER_BUILDKIT: "1"
DOCKER_BUILDKIT: "1"
...
...
Dockerfile
View file @
916d219d
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
FROM
nvidia/cuda:12.4.1-devel-ubuntu22.04 AS dev
FROM
nvidia/cuda:12.4.1-devel-ubuntu22.04 AS dev
RUN
apt-get update
-y
\
RUN
apt-get update
-y
\
&&
apt-get
install
-y
python3-pip git
&&
apt-get
install
-y
python3-pip git
curl
sudo
# Workaround for https://github.com/openai/triton/issues/2507 and
# Workaround for https://github.com/openai/triton/issues/2507 and
# https://github.com/pytorch/pytorch/issues/107960 -- hopefully
# https://github.com/pytorch/pytorch/issues/107960 -- hopefully
...
@@ -70,10 +70,28 @@ ENV NVCC_THREADS=$nvcc_threads
...
@@ -70,10 +70,28 @@ ENV NVCC_THREADS=$nvcc_threads
# make sure punica kernels are built (for LoRA)
# make sure punica kernels are built (for LoRA)
ENV
VLLM_INSTALL_PUNICA_KERNELS=1
ENV
VLLM_INSTALL_PUNICA_KERNELS=1
ARG
USE_SCCACHE
# if USE_SCCACHE is set, use sccache to speed up compilation
RUN
--mount
=
type
=
cache,target
=
/root/.cache/pip
\
if
[
"
$USE_SCCACHE
"
=
"1"
]
;
then
\
echo
"Installing sccache..."
\
&&
curl
-L
-o
sccache.tar.gz https://github.com/mozilla/sccache/releases/download/v0.8.1/sccache-v0.8.1-x86_64-unknown-linux-musl.tar.gz
\
&&
tar
-xzf
sccache.tar.gz
\
&&
sudo mv
sccache-v0.8.1-x86_64-unknown-linux-musl/sccache /usr/bin/sccache
\
&&
rm
-rf
sccache.tar.gz sccache-v0.8.1-x86_64-unknown-linux-musl
\
&&
export
SCCACHE_BUCKET
=
vllm-build-sccache
\
&&
export
SCCACHE_REGION
=
us-west-2
\
&&
sccache
--show-stats
\
&&
python3 setup.py bdist_wheel
--dist-dir
=
dist
\
&&
sccache
--show-stats
;
\
fi
ENV
CCACHE_DIR=/root/.cache/ccache
ENV
CCACHE_DIR=/root/.cache/ccache
RUN
--mount
=
type
=
cache,target
=
/root/.cache/ccache
\
RUN
--mount
=
type
=
cache,target
=
/root/.cache/ccache
\
--mount
=
type
=
cache,target
=
/root/.cache/pip
\
--mount
=
type
=
cache,target
=
/root/.cache/pip
\
python3 setup.py bdist_wheel
--dist-dir
=
dist
if
[
"
$USE_SCCACHE
"
!=
"1"
]
;
then
\
python3 setup.py bdist_wheel
--dist-dir
=
dist
;
\
fi
# check the size of the wheel, we cannot upload wheels larger than 100MB
# check the size of the wheel, we cannot upload wheels larger than 100MB
COPY
.buildkite/check-wheel-size.py check-wheel-size.py
COPY
.buildkite/check-wheel-size.py check-wheel-size.py
...
...
setup.py
View file @
916d219d
...
@@ -140,6 +140,7 @@ class cmake_build_ext(build_ext):
...
@@ -140,6 +140,7 @@ class cmake_build_ext(build_ext):
cmake_args
+=
[
cmake_args
+=
[
'-DCMAKE_CXX_COMPILER_LAUNCHER=sccache'
,
'-DCMAKE_CXX_COMPILER_LAUNCHER=sccache'
,
'-DCMAKE_CUDA_COMPILER_LAUNCHER=sccache'
,
'-DCMAKE_CUDA_COMPILER_LAUNCHER=sccache'
,
'-DCMAKE_C_COMPILER_LAUNCHER=sccache'
,
]
]
elif
is_ccache_available
():
elif
is_ccache_available
():
cmake_args
+=
[
cmake_args
+=
[
...
@@ -171,7 +172,6 @@ class cmake_build_ext(build_ext):
...
@@ -171,7 +172,6 @@ class cmake_build_ext(build_ext):
else
:
else
:
# Default build tool to whatever cmake picks.
# Default build tool to whatever cmake picks.
build_tool
=
[]
build_tool
=
[]
subprocess
.
check_call
(
subprocess
.
check_call
(
[
'cmake'
,
ext
.
cmake_lists_dir
,
*
build_tool
,
*
cmake_args
],
[
'cmake'
,
ext
.
cmake_lists_dir
,
*
build_tool
,
*
cmake_args
],
cwd
=
self
.
build_temp
)
cwd
=
self
.
build_temp
)
...
...
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