Created
May 4, 2026 03:51
-
-
Save jodoherty/0eb76c80c17fe86e9bfe3465a4da9d9f to your computer and use it in GitHub Desktop.
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
| #!/bin/sh | |
| type=cuda | |
| type=rocm | |
| model=google/gemma-4-26B-A4B-it | |
| u=0.9 | |
| if [ "$#" -eq 0 ]; then | |
| set -- -d --restart=unless-stopped | |
| fi | |
| if [ "$type" = "cuda" ]; then | |
| image=vllm/vllm-openai:nightly | |
| set -- "$@" --gpus all | |
| elif [ "$type" = "rocm" ]; then | |
| image=vllm/vllm-openai-rocm:nightly | |
| set -- "$@" --device /dev/kfd --device /dev/dri \ | |
| --security-opt seccomp=unconfined --group-add video | |
| fi | |
| if command -v hf > /dev/null 2>&1; then | |
| hf_token=$(hf auth token 2>/dev/null) | |
| if ! [ -z "$hf_token" ]; then | |
| set -- "$@" -e "HF_TOKEN=$hf_token" | |
| fi | |
| fi | |
| set -- "$@" --privileged --ipc=host \ | |
| --network host \ | |
| --name vllm \ | |
| -v vllm-cache:/root/.cache/huggingface \ | |
| $image \ | |
| $model \ | |
| --gpu-memory-utilization $u \ | |
| --host 0.0.0.0 --port 8013 \ | |
| --tensor-parallel-size 1 \ | |
| --enable-auto-tool-choice \ | |
| --tool-call-parser gemma4 \ | |
| --max-model-len -1 \ | |
| --async-scheduling \ | |
| --chat-template vllm/examples/tool_chat_template_gemma4.jinja \ | |
| --reasoning-parser gemma4 | |
| docker pull "$image" | |
| docker run "$@" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment