Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
2e28654b
Commit
2e28654b
authored
Sep 04, 2025
by
maxiao1
Browse files
Upload New File
parent
3ccce900
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
0 deletions
+55
-0
README.md
README.md
+55
-0
No files found.
README.md
0 → 100644
View file @
2e28654b
# sglang 使用说明
## 简介
SGLang 是一个用于大语言模型(LLM)和多模态视觉语言模型(VLM)的快速推理与服务框架。它通过后端运行时与前端语言的协同设计,与模型的交互更加高效、可控。
---
## 编译/运行环境准备
## 编译环境准备
下载光源的镜像,启动 docker:
```
bash
docker pull image.sourcefind.cn:5000/dcu/admin/base/vllm:0.9.2-ubuntu22.04-dtk25.04.1-rc5-rocblas101839-0811-das1.6-py3.10-20250812-beta
# <Image ID> 用上面拉取的 docker 镜像 ID 替换
# <Host Path> 主机端路径
# <Container Path> 容器映射路径
docker run
-it
--name
mydocker
--shm-size
=
1024G
-v
/opt/hyhal:/opt/hyhal:ro
--device
=
/dev/kfd
--device
=
/dev/dri/
--cap-add
=
SYS_PTRACE <Image ID> /bin/bash
```
> **注意:**
> 1. `docker run -v /opt/hyhal:/opt/hyhal` 这个参数不能少。
> 2. 若使用 `pip install` 下载较慢,可添加国内源,例如:
> `-i https://pypi.tuna.tsinghua.edu.cn/simple/`
---
## 源码准备(GitLab拉取)
```
bash
git clone https://developer.sourcefind.cn/codes/OpenDAS/sglang
```
---
## 安装步骤
进入sglang目录
### 1. 编译安装sgl-kernel包
```
bash
cd
sgl-kernel
python setup_hip.py
install
```
### 2. 安装sglang Python依赖
```
bash
cd
..
pip
install
-e
"python[all_hip]"
```
---
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment