cuda/Dockerfile

38 lines
1.1 KiB
Docker
Raw Normal View History

2023-12-05 20:44:44 +08:00
FROM nvcr.io/nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04
2023-03-13 21:20:02 +08:00
RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
RUN echo "LANG=en_US.UTF-8" > /etc/locale.conf
2023-12-05 20:44:44 +08:00
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y locales git vim nano zsh wget openssh-server && rm -rf /var/lib/apt/lists/*
2023-03-13 21:20:02 +08:00
RUN mkdir /var/run/sshd
RUN echo 'root:qwerty' | chpasswd
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
ENV NOTVISIBLE "in users profile"
RUN echo "export VISIBLE=now" >> /etc/profile
EXPOSE 22
2023-12-05 20:44:44 +08:00
2023-03-13 21:20:02 +08:00
RUN usermod -s /bin/zsh root
2023-12-05 20:44:44 +08:00
ENTRYPOINT service ssh start && zsh
#RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
#RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub