











下载docker镜像
到沐曦开发者社区,镜像资源中心 https://developer.metax-tech.com/softnova/docker 下载docker镜像。
拉取测试镜像,注意,若拉取失败,需要登陆社区复制带登陆的拉取命令
docker pull cr.metax-tech.com/public-library/maca-c500:2.23.0.5-ubuntu22.04-x86_64

检查容器环境
docker run -it \ --rm \ --device=/dev/dri \ --device=/dev/mxcd \ --group-add 44 \ --name test-mx-smi \ --device=/dev/mem \ cr.metax-tech.com/public-library/maca-c500:2.23.0.5-ubuntu22.04-x86_64 \ mx-smi
容器内可以正常识别显卡。
拉取镜像,专用的sglang推理框架镜像。

拉取失败,需要登陆社区复制带登陆的拉取命令
docker pull cr.metax-tech.com/public-ai-release/maca/sglang:0.5.10-maca.ai3.7.1.12-torch2.8-py310-ubuntu22.04-amd64
使用镜像拉起一个测试容易,验证能不能正常识别显卡。 docker run -it \ --rm \ --device=/dev/dri \ --device=/dev/mxcd \ --group-add 44 \ --name test-mx-smi \ --device=/dev/mem \ sglang:0.5.10-maca.ai3.7.1.12-torch2.8-py310-ubuntu22.04-amd64 \ mx-smi
使用镜像拉起一个测试容器,验证容器内环境。 docker run --rm -it \ --device=/dev/dri \ --device=/dev/mxcd \ --device=/dev/mem \ --group-add 44 \ --security-opt seccomp=unconfined \ --security-opt apparmor=unconfined \ sglang:0.5.10-maca.ai3.7.1.12-torch2.8-py310-ubuntu22.04-amd64 \ bash -lc ' echo "===== Python =====" && which python python3 && python --version && echo "" && echo "===== torch =====" && python - << EOF import torch print("torch:", torch.__version__) print("cuda available:", torch.cuda.is_available()) print("device count:", torch.cuda.device_count()) EOF echo "" && echo "===== mx-smi =====" && '
下载一个小模型方便测试
pip3 install modelscope modelscope download --model Qwen/Qwen3.5-4B --local_dir /home/models/modelscope/qwen35b_4b_20260612
先运行一个小模型qwen3.5-4b,测试容器环境
docker run -it \ --restart always \ --device=/dev/dri \ --device=/dev/mxcd \ --group-add 44 \ --name qwen3.5-4b \ --device=/dev/mem \ -p 18000:8000 \ --security-opt seccomp=unconfined \ --security-opt apparmor=unconfined \ --shm-size '100gb' \ --ulimit memlock=-1 \ -v /home/models/modelscope/:/home/models/modelscope/ \ -v /etc/localtime:/etc/localtime \ sglang:0.5.10-maca.ai3.7.1.12-torch2.8-py312-ubuntu22.04-amd64 \ /opt/conda/bin/python -m sglang.launch_server \ --model-path /home/models/modelscope/qwen35b_4b_20260612 \ --port 8000 \ --host 0.0.0.0 \ --tensor-parallel-size 1 \ --context-length 32768 \ --trust-remote-code \ --served-model-name qwen35b_4b_20260612
从容器日志看,报错:FileNotFoundError: [Errno 2] No such file or directory: 'ninja'
在容器里安装 ninja:
apt update && apt install -y ninja-build
测试api curl http://localhost:18000/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "qwen3.5-4b", "messages": [ {"role": "user", "content": "你是谁"} ], "temperature": 0.7 }'
使用sglang:0.5.9镜像,双卡布署qwen3.5-35B
docker pull cr.metax-tech.com/public-ai-release/maca/sglang:0.5.9-maca.ai3.5.3.208-torch2.8-py310-ubuntu22.04-amd64 拉取sglang:0.5.9镜像
modelscope download --model Qwen/Qwen3.5-35B-A3B --local_dir /home/models/modelscope/qwen35b_20260302 下载qwen3.5-35B
双卡布署qwen3.5-35B
docker run -it \ --restart always \ --device=/dev/dri \ --device=/dev/mxcd \ --group-add 44 \ --name qwen3.5-35b-tool-metax \ --device=/dev/mem \ -p 18000:8000 \ --security-opt seccomp=unconfined \ --security-opt apparmor=unconfined \ --shm-size '32gb' \ --ulimit memlock=-1 \ -v /home/models/modelscope/:/home/models/modelscope/ \ -v /etc/localtime:/etc/localtime \ -e PYTORCH_CUDA_ALLOC_CONF="expandable_segments:True,max_split_size_mb:256" \ sglang:0.5.9-maca.ai3.5.3.208-torch2.8-py310-ubuntu22.04-amd64 \ /opt/conda/bin/python -m sglang.launch_server \ --model-path /home/models/modelscope/qwen35b_20260302 \ --port 8000 \ --host 0.0.0.0 \ --tensor-parallel-size 2 \ --context-length 32768 \ --trust-remote-code \ --served-model-name qwen3.5-35b-tool-20260302-metax \ --reasoning-parser qwen3 \ --tool-call-parser qwen3_coder
单卡布署qwen3.6-27b
下载qwen3.6-27b,曦云专用模型
modelscope download --model metax-tech/Qwen3.6-27B-W8A8 --local_dir /home/models/modelscope/qwen36b_27b_w8a8_20260512
曦云C500单卡布署Qwen3.6-27B
docker run -it \ --restart always \ --device=/dev/dri \ --device=/dev/mxcd \ --group-add 44 \ --name test-qwen36b_27b_w8a8_20260512 \ --device=/dev/mem \ -p 18000:8000 \ --security-opt seccomp=unconfined \ --security-opt apparmor=unconfined \ --shm-size '100gb' \ --ulimit memlock=-1 \ -v /home/models/modelscope/:/home/models/modelscope/ \ -v /etc/localtime:/etc/localtime \ sglang:0.5.10-maca.ai3.7.1.12-torch2.8-py310-ubuntu22.04-amd64 \ /opt/conda/bin/python -m sglang.launch_server \ --model-path /home/models/modelscope/qwen36b_27b_w8a8_20260512 \ --port 8000 \ --host 0.0.0.0 \ --tensor-parallel-size 1 \ --context-length 32768 \ --trust-remote-code \ --served-model-name qwen3.6-27b_w8a8
曦云C500单卡,使用sglang:0.5.10布Qwen3.6-35B-W8A8。
下载 modelscope download --model metax-tech/Qwen3.6-35B-A3B-W8A8 --local_dir /home/models/modelscope/qwen36b_35b_w8a8_20260429
docker run -it \ --restart always \ --device=/dev/dri \ --device=/dev/mxcd \ --group-add 44 \ --name qwen36b_35b_w8a8_20260429 \ --device=/dev/mem \ -p 18000:8000 \ --security-opt seccomp=unconfined \ --security-opt apparmor=unconfined \ --shm-size '100gb' \ --ulimit memlock=-1 \ -v /home/models/modelscope/:/home/models/modelscope/ \ -v /etc/localtime:/etc/localtime \ sglang:0.5.10-maca.ai3.7.1.12-torch2.8-py310-ubuntu22.04-amd64 \ /bin/bash -c "apt update && apt install -y ninja-build && \ /opt/conda/bin/python -m sglang.launch_server \ --model-path /home/models/modelscope/qwen36b_35b_w8a8_20260429 \ --port 8000 \ --host 0.0.0.0 \ --tensor-parallel-size 1 \ --context-length 32768 \ --trust-remote-code \ --served-model-name qwen36b_35b_w8a8_20260429"
单卡测试成功。

此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。