-
Notifications
You must be signed in to change notification settings - Fork 1k
[Doc] Add guides for custom docker image build on NVIDIA CUDA [Skip-CI] #1386
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
Open
loveysuby
wants to merge
18
commits into
vllm-project:main
Choose a base branch
from
loveysuby:docs/add-custom-docker-build-on-nvidia-cuda
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+54
−0
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
cab1097
[Doc] add custom cuda build guides
loveysuby 995049e
Merge remote-tracking branch 'upstream/main' into docs/add-custom-doc…
loveysuby 2ef5846
docs: revise custom image build guide based on Dockerfile.cuda (#1439)
loveysuby 2565171
Merge branch 'main' into docs/add-custom-docker-build-on-nvidia-cuda
loveysuby 34f5bfe
Merge branch 'main' into docs/add-custom-docker-build-on-nvidia-cuda
loveysuby f74ba81
Update base image version
loveysuby 8d4211a
Merge branch 'main' into docs/add-custom-docker-build-on-nvidia-cuda
loveysuby c396c07
Merge branch 'main' into docs/add-custom-docker-build-on-nvidia-cuda
loveysuby 0dff3b8
docs: Use HF_HOME env for model cache path
loveysuby 528e4d7
Merge branch 'main' into docs/add-custom-docker-build-on-nvidia-cuda
loveysuby 7795a0c
Merge branch 'main' into docs/add-custom-docker-build-on-nvidia-cuda
tzhouam 8ca92d2
Merge branch 'main' into docs/add-custom-docker-build-on-nvidia-cuda
loveysuby 835b259
Update CUDA base image version to v0.20.0
loveysuby 8faed3f
Merge branch 'main' into docs/add-custom-docker-build-on-nvidia-cuda
loveysuby 4c70f80
Merge branch 'main' into docs/add-custom-docker-build-on-nvidia-cuda
loveysuby 97f04c0
Update CUDA base image version to v0.21.0
loveysuby 650448a
Merge branch 'main' into docs/add-custom-docker-build-on-nvidia-cuda
loveysuby df3a542
Merge branch 'main' into docs/add-custom-docker-build-on-nvidia-cuda
congw729 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -110,3 +110,53 @@ docker run --runtime nvidia --gpus 2 \ | |
| The CUDA image does not define a default entrypoint, so include `vllm serve ... --omni` after the image name. | ||
|
|
||
| # --8<-- [end:pre-built-images] | ||
|
|
||
| # --8<-- [start:build-docker] | ||
|
|
||
| #### Build docker image | ||
|
|
||
| ```bash | ||
| DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile.cuda -t vllm-omni-cuda . | ||
| ``` | ||
|
|
||
| If you want to specify the base vLLM version: | ||
|
|
||
| ```bash | ||
|
loveysuby marked this conversation as resolved.
|
||
| DOCKER_BUILDKIT=1 docker build \ | ||
| -f docker/Dockerfile.cuda \ | ||
| --build-arg BASE_IMAGE=vllm/vllm-openai:v0.21.0 \ | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PTAL @Gaohan123: |
||
| -t vllm-omni-cuda . | ||
| ``` | ||
|
|
||
| #### Launch the docker image | ||
|
|
||
| ##### Launch with OpenAI API Server | ||
|
|
||
| !!! note | ||
| The model `Qwen/Qwen3-Omni-30B-A3B-Instruct` requires significant GPU memory. The example below has been verified on 2 x H100's. | ||
|
|
||
| ```bash | ||
| docker run --runtime nvidia --gpus 2 \ | ||
| -v ${HF_HOME:-$HOME/.cache/huggingface}:/root/.cache/huggingface \ | ||
| --env "HF_TOKEN=$HF_TOKEN" \ | ||
| -p 8091:8091 \ | ||
| --ipc=host \ | ||
| vllm-omni-cuda \ | ||
| vllm serve --omni --model Qwen/Qwen3-Omni-30B-A3B-Instruct --port 8091 | ||
| ``` | ||
|
|
||
| By default, this mounts `$HOME/.cache/huggingface` as the model cache directory. To use a custom location, set the `HF_HOME` environment variable before running the command (e.g., `export HF_HOME=/data/models`). | ||
|
|
||
| ##### Launch with interactive session for development | ||
|
|
||
| ```bash | ||
| docker run --runtime nvidia --gpus all -it --rm \ | ||
| -v ${HF_HOME:-$HOME/.cache/huggingface}:/root/.cache/huggingface \ | ||
| --env "HF_TOKEN=$HF_TOKEN" \ | ||
| -p 8091:8091 \ | ||
| --ipc=host \ | ||
| --entrypoint bash \ | ||
| vllm-omni-cuda | ||
| ``` | ||
|
|
||
| # --8<-- [end:build-docker] | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.