Sign inSign up

initialencounter/cuda

By initialencounter

Updated over 2 years ago

Image
0

103

initialencounter/cuda repository overview

initialencounter/cuda

software

  • cuda12.1
  • pytorch2.1.2
  • pycharm-community-2023.3.2
  • ssh
  • xfce+tightvnc
  • jupyter

usage

docker run -e ALL_PASSWD="vncpasswd" -e SSH_PORT=22 -e VNC_PORT=5901 -e JUPYTER_PORT=3389 -p 8000:22 -p 8001:5901 -p 8002:3389 -p 8003-8009:7863-7869 --gpus 0 -it initialencounter/cuda:12.1.0-devel-ubuntu22.04
  • ALL_PASSWD:ssh vnc jupyter的密码
  • SSH_PORT: ssh端口
  • VNC_PORT:VNC端口
  • JUPYTER_PORT: jupyter端口

Dockerfile

from nvidia/cuda:12.1.0-devel-ubuntu22.04

# set label
LABEL maintainer="galaxy"
LABEL description="cuda12.1"
LABEL custom_message="cuda:12.1.0-devel-ubuntu22.04"

RUN apt update
ENV DEBIAN_FRONTEND=noninteractive
# xfce+tightvnvsercer
RUN apt-get update && \
    apt-get install -y xfce4 xfce4-terminal xvfb tightvncserver expect vim wget git sudo default-jdk openssh-server && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# install miniconda
RUN wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py310_23.11.0-2-Linux-x86_64.sh && \
    bash Miniconda3-py310_23.11.0-2-Linux-x86_64.sh -b -p /opt/miniconda3 && \
    echo ". /opt/miniconda3/bin/activate" >> ~/.bashrc && \
    wget https://mirror.sjtu.edu.cn/pytorch-wheels/cu121/torch-2.1.2%2Bcu121-cp310-cp310-linux_x86_64.whl && \
    . /opt/miniconda3/bin/activate && \
    pip install torch-2.1.2+cu121-cp310-cp310-linux_x86_64.whl torchaudio torchvision pandas transformers tensorboard jupyter -i https://mirror.sjtu.edu.cn/pypi/web/simple/ && \
    rm torch-2.1.2+cu121-cp310-cp310-linux_x86_64.whl Miniconda3-py310_23.11.0-2-Linux-x86_64.sh

# install pycharm
RUN wget https://download-cdn.jetbrains.com/python/pycharm-community-2023.3.2.tar.gz && \
    tar -xvf pycharm-community-2023.3.2.tar.gz && \
    mv pycharm-community-2023.3.2 /opt/pycharm && \
    rm pycharm-community-2023.3.2.tar.gz

# config entrypoint
COPY entrypoint /entrypoint
RUN mkdir /root/Desktop && \
    cp /entrypoint/pycharm.desktop /root/Desktop/pycharm.desktop && \
    cp /entrypoint/entrypoint.sh /opt/nvidia/nvidia_entrypoint.sh

ENTRYPOINT ["/opt/nvidia/nvidia_entrypoint.sh"]

git

https://github.com/initialencounter/mydocker/blob/main/cuda12.1/Dockerfile.ubuntu22.04

Tag summary

Content type

Image

Digest

sha256:d4781a0eb

Size

7.5 GB

Last updated

over 2 years ago

docker pull initialencounter/cuda:12.1.0-devel-ubuntu20.04