1.DCU 介绍
DCU(Deep Computing Unit 深度计算器)是 海光(HYGON)推出的一款专门用于 AI 人工智能和深度学习的加速卡。DCU也可以应用于密集型数值计算。例如:DCU Z100 32GB HBM2 PCIE 4.0 x16国产通用GPU卡* 2支持ECC,单块GPU卡显存32GB HBM2,FP64 10.8TFlops,通用计算核心8192。
2.基础环境
8K100 64GB 2Hygon C86 7380 32 Cores 1TB Memory
Ubuntu 22.04.1 DCU driver: rock-5.2.0-5.16.29-V01.13 DTK 23.10.1
3.Docker部署
使用xinference作为推理后台进行部署,拉取部署镜像
docker pull image.sourcefind.cn:5000/dcu/admin/base/custom:vllm0.5.0-dtk24.04.1-ubuntu20.04-py310-zk-v1
运行镜像并进入容器内部
docker run -it --name transformers --privileged --shm-size=256G --device=/dev/kfd --device=/dev/dri/ --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --ulimit memlock=-1:-1 --ipc=host --network host --group-add video
-v /opt/hyhal:/opt/hyhal
-v /home//env/model:/home/env/model ///模型映射文件
762690254610 /bin/bash
安装xinference并使用vllm作为推理引擎
pip install "xinference[vllm]" -i https://pypi.mirrors.ustc.edu.cn/simple
启动xinference并运行qwen2.5-instruct-7B
XINFERENCE_MODEL_SRC=modelscope xinference-local --host 0.0.0.0
xinference launch --model-engine vLLM --model-name qwen2.5-instruct --size-in-billions 7 --model-format pytorch --gpu-idx 0,1,2,3