这里罗列一些打包的镜像,方便直接使用。
docker push kevinchina/deeplearning
.6ubuntu18.04bashFROM nvidia/cuda:11.6.2-cudnn8-devel-ubuntu18.04
RUN apt-get update && apt-get install -y wget git vim curl
RUN wget http://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/conda.sh && \
bash /tmp/conda.sh -b && rm /tmp/conda.sh
ENV DEBIAN_FRONTEND=noninteractive
# 安装 tzdata 包并设置时区为上海(无交互)
RUN apt-get update && \
apt-get install -y tzdata && \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone
RUN ~/miniconda3/bin/conda init bash && . ~/.bashrc
RUN . ~/.bashrc && curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \
apt-get install -y git-lfs && git-lfs install
RUN apt-get install -y python3-pip
# 打印~/.bashrc
RUN . ~/.bashrc && pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
RUN . ~/.bashrc && conda create -n py3_10_c2 python=3.10 -y
# RUN . ~/.bashrc && conda activate py3_10_c2 && conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.6 -c pytorch -c nvidia -y
docker push kevinchina/deeplearning
.8ubuntu22.04bashFROM nvidia/cuda:11.8.0-devel-ubuntu22.04
RUN apt-get update && apt-get install -y wget git vim curl
RUN wget http://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/conda.sh && \
bash /tmp/conda.sh -b && rm /tmp/conda.sh
ENV DEBIAN_FRONTEND=noninteractive
# 安装 tzdata 包并设置时区为上海(无交互)
RUN apt-get update && \
apt-get install -y tzdata && \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone
RUN ~/miniconda3/bin/conda init bash && . ~/.bashrc
RUN . ~/.bashrc && curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \
apt-get install -y git-lfs && git-lfs install
RUN apt-get install -y python3-pip
# 打印~/.bashrc
RUN . ~/.bashrc && pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
RUN . ~/.bashrc && conda create -n py3_10_c2 python=3.10 -y
#RUN . ~/.bashrc && conda activate py3_10_c2 && conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.6 -c pytorch -c nvidia -y
clikeFROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04 ENV DEBIAN_FRONTEND=noninteractive # 安装基本软件包 RUN apt-get update && \ apt-get upgrade -y && \ apt-get -y --no-install-recommends install vim wget curl build-essential python3.10 python3-pip sudo && \ update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 && \ apt-get install -y libgl1 libglib2.0-0 ffmpeg tzdata && \ ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ echo "Asia/Shanghai" > /etc/timezone # 创建用户xd RUN useradd -m -s /bin/bash xd # 设置用户xd的密码为qwer1234.. RUN echo 'xd:qwer1234..' | chpasswd # 将用户xd添加到sudo组并配置sudo无密码 RUN usermod -aG sudo xd && echo 'xd ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/xd # 切换到xd用户 USER xd # 设置工作目录 WORKDIR /home/xd
clikeFROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 ENV DEBIAN_FRONTEND=noninteractive # 安装基本软件包 RUN apt-get update && \ apt-get upgrade -y && \ apt-get -y --no-install-recommends install vim wget curl git build-essential python3.10 python3-pip python3.10-venv sudo && \ update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 && \ apt-get install -y libgl1 libglib2.0-0 # 安装 tzdata 包并设置时区为上海(无交互) RUN apt-get update && \ apt-get install -y tzdata && \ ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ echo "Asia/Shanghai" > /etc/timezone
nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04 + 纯python+cuda12.1 pytorch 2.1
已推:docker push kevinchina/deeplearning
.1torch2.1.1bashFROM nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
# 安装基本软件包
RUN apt-get update && \
apt-get upgrade -y && \
apt-get -y --no-install-recommends install vim wget curl git build-essential python3.10 python3-pip python3.10-venv sudo && \
update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 && \
apt-get install -y libgl1 libglib2.0-0
# 安装 tzdata 包并设置时区为上海(无交互)
RUN apt-get update && \
apt-get install -y tzdata && \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone
RUN pip install torch==2.1.1 torchvision==0.16.1 torchaudio==2.1.1 --index-url https://download.pytorch.org/whl/cu121
docker push kevinchina/deeplearning
pythonFROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
# 安装基本软件包
RUN apt-get update && \
apt-get upgrade -y && \
apt-get -y --no-install-recommends install vim wget curl build-essential python3.10-dev python3.10 python3-pip sudo && \
update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 && \
apt-get install -y libgl1 libglib2.0-0 ffmpeg tzdata && \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone
RUN apt-get -y --no-install-recommends install vim wget curl git build-essential python3.10 python3-pip python3.10-venv sudo
RUN apt-get install -y libgl1 libglib2.0-0
docker push kevinchina/deeplearning
.1.2python# CUDA 11.8
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
# 安装基本软件包
RUN apt-get update && \
apt-get upgrade -y && \
apt-get -y --no-install-recommends install vim wget curl build-essential python3.10-dev python3.10 python3-pip sudo && \
update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 && \
apt-get install -y libgl1 libglib2.0-0 ffmpeg tzdata && \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone
RUN apt-get -y --no-install-recommends install vim wget curl git build-essential python3.10 python3-pip python3.10-venv sudo
RUN apt-get install -y libgl1 libglib2.0-0
RUN pip install torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 --index-url https://download.pytorch.org/whl/cu118
本文作者:Dong
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 CC BY-NC。本作品采用《知识共享署名-非商业性使用 4.0 国际许可协议》进行许可。您可以在非商业用途下自由转载和修改,但必须注明出处并提供原作者链接。 许可协议。转载请注明出处!