docker build -f /data1/home/liyuanzhou/ubuntu/dockerfile -t liyz_yolo:666 .
使用dockerfile构建镜像
FROM nvcr.io/nvidia/pytorch:21.10-py3
RUN apt update && apt install -y zip htop screen libgl1-mesa-glx
COPY requirements.txt .
RUN python -m pip install --upgrade pip
RUN pip uninstall -y torch torchvision torchtext
RUN pip install --no-cache -r requirements.txt albumentations wandb gsutil notebook
torch1.10.2+cu113 torchvision0.11.3+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
VOLUME ["/data1/home/liyuanzhou/ubuntu/volume"]
CMD echo "..end..."
CMD /bin/bash
docker run -itd --name liyz_yolo --runtime=nvidia --ipc=host -p 3090:22 -v /data1/home/liyuanzhou/docker_code:/docker_code liyz_yolo:666 /bin/bash
docker exec -it liyz_yolo bash
标签:liyz,--,RUN,yolo,3090,pip,服务器,docker From: https://www.cnblogs.com/liyuanzhouye/p/16617658.html