wei/个人文档/ray部署.md
2026-06-04 13:57:41 +08:00

33 lines
728 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 1. 直接指定版本号
```bash
# 下载python3和pip 版本为python 3.12.4
sudo apt install python3-pip
# 基本安装
pip install ray==2.44.0
# 安装完整功能版本
pip install "ray[default]==2.44.0"
# 如果已安装其他版本,先卸载再安装
pip uninstall ray -y
pip install ray==2.44.0
```
## 创建符号链接可直接使用ray命令
```bash
# 创建符号链接到/usr/local/bin需要sudo权限
sudo ln -s /home/zhou1/.local/bin/ray /usr/local/bin/ray
```
## 2. 验证版本
安装后验证版本是否正确:
```bash
# 使用命令行检查
ray --version
# 启动加入集群,根据机器配置选择cpu数量,集群头部ip端口
ray start --num-cpus=500 --address=192.168.1.15:6379
```