mitakad查看 Docker Hub 原文页
基于Jetson Orin AGX构建的SGLang镜像,支持并行推理,由jetson-containers构建,适用于在边缘设备上部署大语言模型推理服务。
2 次收藏下载次数: 0状态:社区镜像维护者:mitakad仓库类型:镜像最近更新:
SGLang Jetson Orin AGX 镜像文档
镜像概述
本镜像基于NVIDIA Jetson Orin AGX(SM 87)构建,集成了SGLang框架,支持在边缘设备上高效部署大语言模型推理服务。镜像内置实验性NCCL支持的PyTorch,可实现多节点并行推理,适用于资源受限环境下的AI模型部署。
核心功能与特性
- 硬件适配:专为Jetson Orin AGX优化,支持其GPU计算能力(8.7)
- 并行推理:通过实验性NCCL支持实现多节点并行推理
- 量化支持:兼容GPTQ(Int4/Int8)和FP8等量化模型,平衡性能与资源占用
- 高效推理:集成flashinfer注意力后端、speculative decoding等优化技术
- 丰富配置:支持上下文长度、内存分配、推理策略等多维度参数调优
使用场景
- 边缘设备上的大语言模型部署
- 资源受限环境下的AI推理服务
- 多节点分布式推理实验
- 量化模型的高效运行验证
使用方法
基础运行方式
通过jetson-containers运行镜像:
bashjetson-containers run IMAGE_NAME
GPTQ量化模型示例(SGL v0.6.0测试通过)
方法一:使用sglang serve命令
bashSGLANG_ENABLE_SPEC_V2=1 SGLANG_DISABLE_CUDNN_CHECK=1 \ sglang serve --host 0.0.0.0 --port 8000 \ --model-path Qwen/Qwen3.5-35B-A3B-GPTQ-Int4 \ --tp-size 1 \ --mem-fraction-static 0.9 \ --context-length 2048 \ --reasoning-parser qwen3 \ --tool-call-parser qwen3_coder \ --speculative-algo NEXTN \ --speculative-num-steps 3 \ --speculative-eagle-topk 1 \ --speculative-num-draft-tokens 4 \ --quantization moe_wna16 \ --mamba-scheduler-strategy extra_buffer
方法二:使用launch_server模块
bashpython -m sglang.launch_server --host 0.0.0.0 --port 8000 \ --model-path Qwen/Qwen3-0.6B-GPTQ-Int8 \ --tp-size 1 \ --mem-fraction-static 0.8 \ --context-length 2048 \ --reasoning-parser qwen3 \ --attention-backend flashinfer \ --quantization gptq
FP8量化模型示例(SGL v0.6.0测试通过)
注意:Qwen/Qwen3.5-35B-A3B-FP8模型在推理时可能出现超时问题
bashpython -m sglang.launch_server --host 0.0.0.0 --port 8000 \ --model-path Qwen/Qwen3-0.6B-FP8 \ --tp-size 1 \ --mem-fraction-static 0.8 \ --context-length 2048 \ --reasoning-parser qwen3 \ --attention-backend flashinfer \ --quantization fp8
典型部署示例:Qwen3-4B-Instruct模型
启动服务
bashpython3 -m sglang.launch_server --host 0.0.0.0 --port 8000 \ --model-path Qwen/Qwen3-4B-Instruct-2507 \ --mem-fraction-static 0.5 \ --context-length 8192
发送推理请求
bashcurl --location 'http://localhost:8000/v1/chat/completions' \ --header 'Content-Type: application/json' \ --data '{ "model": "Qwen/Qwen3-4B-Instruct-2507", "messages": [ { "role": "user", "content": "Why is the sky blue?" } ] }'
镜像环境信息
mitakad/sglang:0.5.4-r36.4.tegra-aarch64-cp310-cu126-22.04-truncated
Built with: ENABLE_DISTRIBUTED_JETSON_NCCL=1 PYTORCH_FORCE_BUILD=on CUDA_VERSION=12.6 PYTHON_VERSION=3.10 LSB_RELEASE=22.04 PYTORCH_VERSION=2.9 jetson-containers build sglang:0.5.4-builder testing SGLang... ✅ Memory cleared Python: 3.12.12 (main, Oct 14 2025, 21:26:46) [Clang 20.1.4 ] CUDA available: True GPU 0: Orin GPU 0 Compute Capability: 8.7 CUDA_HOME: /usr/local/cuda NVCC: Cuda compilation tools, release 12.9, V12.9.86 CUDA Driver Version: 540.4.0 PyTorch: 2.9.0 sglang: 0.5.3.post3 sgl_kernel: 0.3.16.post3 flashinfer_python: 0.4.1 triton: 3.4.0 transformers: 4.57.1 torchao: 0.9.0 numpy: 2.3.4 aiohttp: 3.13.1 fastapi: 0.119.1 hf_transfer: 0.1.9 huggingface_hub: 0.35.3 interegular: 0.3.3 modelscope: 1.31.0 orjson: 3.11.3 outlines: 1.2.7 packaging: 25.0 psutil: 7.1.1 pydantic: 2.12.3 python-multipart: 0.0.20 pyzmq: 27.1.0 uvicorn: 0.38.0 uvloop: 0.22.1 vllm: Module Not Found xgrammar: 0.1.25 openai: 2.6.0 tiktoken: 0.12.0 anthropic: 0.71.0 litellm: Module Not Found decord: Module Not Found ulimit soft: 1048576 SGLang OK
mitakad/sglang:0.5.4-r36.4.tegra-aarch64-cp312-cu129-24.04-truncated
Built with: ENABLE_DISTRIBUTED_JETSON_NCCL=1 PYTORCH_FORCE_BUILD=on CUDA_VERSION=12.9 PYTHON_VERSION=3.12 LSB_RELEASE=24.04 PYTORCH_VERSION=2.9 jetson-containers build sglang:0.5.4-builder testing SGLang... ✅ Memory cleared Python: 3.12.12 (main, Oct 14 2025, 21:26:46) [Clang 20.1.4 ] CUDA available: True GPU 0: Orin GPU 0 Compute Capability: 8.7 CUDA_HOME: /usr/local/cuda NVCC: Cuda compilation tools, release 12.9, V12.9.86 CUDA Driver Version: 540.4.0 PyTorch: 2.9.0 sglang: 0.5.4 sgl_kernel: 0.3.16.post3 flashinfer_python: 0.4.1 triton: 3.4.0 transformers: 4.57.1 torchao: 0.9.0 numpy: 2.3.4 aiohttp: 3.13.1 fastapi: 0.120.0 hf_transfer: 0.1.9 huggingface_hub: 0.36.0 interegular: 0.3.3 modelscope: 1.31.0 orjson: 3.11.4 outlines: 1.2.7 packaging: 25.0 psutil: 7.1.1 pydantic: 2.12.3 python-multipart: 0.0.20 pyzmq: 27.1.0 uvicorn: 0.38.0 uvloop: 0.22.1 vllm: Module Not Found xgrammar: 0.1.25 openai: 2.6.1 tiktoken: 0.12.0 anthropic: 0.71.0 litellm: 1.79.0 decord2: 2.0.0 ulimit soft: 1048576 SGLang OK
参考文档
SGLang Jetson平台官方文档:[***]
多节点推理说明:https://github.com/sgl-project/sglang/issues/8164
mitakad 命名空间的其他可用镜像:
镜像拉取方式
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
DockerHub 原生拉取命令
docker pull mitakad/sglang:<标签>
用户好评
来自真实用户的反馈,见证轩辕镜像的优质服务