
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
The official SGLang artifact docker image.
Maintained by: openEuler CloudNative SIG.
Where to get help: openEuler CloudNative SIG, openEuler.
SGLang is a fast serving framework for large language models (LLMs) and vision language models. It provides high-performance inference capabilities through co-designed backend runtime and frontend language. Learn more at https://github.com/sgl-project/sglang.
The tag of each SGLang docker image is consist of the version of SGLang and the version of basic image. The details are as follows:
| Tags | Currently | Architectures |
|---|---|---|
| https://gitee.com/openeuler/openeuler-docker-images/blob/master/AI/sglang/0.5.12/24.03-lts-sp3/Dockerfile | sglang 0.5.12 on openEuler 24.03-LTS-SP3 | amd64, arm64 |
| https://gitee.com/openeuler/openeuler-docker-images/blob/master/AI/sglang/0.5.11/24.03-lts-sp3/Dockerfile | sglang 0.5.11 on openEuler 24.03-lts-sp3 | amd64, arm64 |
In this usage, users can select the corresponding {Tag} based on their requirements. Build artifacts are placed under /opt/sglang inside the image.
Pull the image (example):
bashdocker pull my-registry/sglang:0.5.11
Check SGLang installation:
bashdocker run --rm my-registry/sglang:0.5.11 python3 -c "import sglang; print(sglang.__version__)"
View available parameters:
bashdocker run --rm my-registry/sglang:0.5.11 python3 -m sglang.launch_server --help
Start the SGLang inference server (example):
bashdocker run --gpus all \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ my-registry/sglang:0.5.11 \ python3 -m sglang.launch_server \ --model-path meta-llama/Llama-3.1-8B-Instruct \ --host 0.0.0.0 \ --port 30000
Deploy SGLang as a Kubernetes Deployment with GPU support. Example:
yamlapiVersion: apps/v1 kind: Deployment metadata: name: sglang-server spec: replicas: 1 selector: matchLabels: app: sglang-server template: metadata: labels: app: sglang-server spec: containers: - name: sglang image: my-registry/sglang:0.5.11 ports: - containerPort: 30000 args: - python3 - -m - sglang.launch_server - --model-path - meta-llama/Llama-3.1-8B-Instruct - --host - "0.0.0.0" - --port - "30000" resources: requests: nvidia.com/gpu: 1 limits: nvidia.com/gpu: 1 volumeMounts: - name: huggingface-cache mountPath: /root/.cache/huggingface volumes: - name: huggingface-cache persistentVolumeClaim: claimName: huggingface-pvc --- apiVersion: v1 kind: Service metadata: name: sglang-service spec: type: LoadBalancer ports: - port: 30000 targetPort: 30000 selector: app: sglang-server
After starting the server, you can interact with SGLang using the OpenAI-compatible API:
bash# Chat completions API curl http://localhost:30000/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "meta-llama/Llama-3.1-8B-Instruct", "messages": [ {"role": "user", "content": "Hello, how are you?"} ], "max_tokens": 256 }' # Completions API curl http://localhost:30000/v1/completions \ -H "Content-Type: application/json" \ -d '{ "model": "meta-llama/Llama-3.1-8B-Instruct", "prompt": "The capital of France is", "max_tokens": 32 }'
If you have any questions or want to use special features, please submit an issue or a pull request on https://atomgit.com/openeuler/openeuler-docker-images.
以下是 openeuler/sglang 相关的常用 Docker 镜像,适用于 不同场景 等不同场景:
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务