1.安装docker
安装docker
sudo apt-get install -y docker.io # 安装docker
sudo service docker start # 启动docker服务
如果在没有网络的linux上安装可选择docker二进制安装。
给当前用户赋docker控制权限(也可直接在root用户下操作,省去此命令)
# 其中 ubuntu是用户名,可自定义
sudo usermod -a -G docker ubuntu #创建docker用户
exec sudo su -l ubuntu # 给ubuntu用户权限
查看镜像或容器
docker images
docker container ls
2.生成ray的官方镜像
下载ray
git clone https://github.com/ray-project/ray.git
生成镜像命令,注因其中有部分需要访问外网,故此处运行需很久,可以修改Dockerfile给为国内镜像。
cd ray
./build-docker.sh
最终生成四个镜像,通过docker images
查看
REPOSITORY TAG IMAGE ID CREATED SIZE
ray-project/examples latest 7584bde65894 4 days ago 3.257 GB
ray-project/deploy latest 970966166c71 4 days ago 2.899 GB
ray-project/base-deps latest f45d66963151 4 days ago 2.649 GB
ubuntu xenial