ubuntu docker炼丹环境配置

给大家推荐一个可以使用知识库和自己提示词的gpt网站超级好用:ITGPT

正题开始:

安装docker

sudo apt update
sudo apt install vim curl python3-pip git  -y
sudo curl -SsL get.docker.com | sudo bash

docker 换源

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["http://hub-mirror.c.163.com"]
}
EOF
sudo systemctl enable docker
sudo systemctl start docker
sudo groupadd docker
sudo gpasswd -a ${USER} docker
sudo chmod a+rw /var/run/docker.sock

docker run命令参考下面

docker run命令参考

NVIDIA runtime

Migration Notice | nvidia-container-runtime

curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | \
  sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list | \
  sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list
sudo apt-get update

NVIDIA/nvidia-container-runtime: NVIDIA container runtime (github.com)

sudo apt-get install nvidia-container-runtime

docker NVIDIA显卡镜像

docker pull nvidia/cuda:11.8.0-devel-ubuntu22.04

cuda 11.7

docker pull nvidia/cuda:11.8.0-devel-ubuntu22.04


pip3 install torch torchvision torchaudio

cuda 11.6

pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
docker run -p 8000:8000 -d --gpu all --name jupyterhubgpu  --restart=always jockerdragon/jupyterhub:custoner-0.1 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值