42 lines
1.2 KiB
Docker
42 lines
1.2 KiB
Docker
FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu20.04
|
|
|
|
# encoding
|
|
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
|
|
|
|
|
|
# fix (tzdata)
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get update && apt-get install -y software-properties-common gcc && \
|
|
add-apt-repository -y ppa:deadsnakes/ppa
|
|
|
|
RUN apt-get update && apt-get install -y python3.7 python3-distutils python3-pip python3-apt
|
|
|
|
|
|
|
|
RUN apt-get install -y locales git vim nano
|
|
|
|
|
|
|
|
|
|
RUN echo 'alias python="python3"' >> ~/.bashrc
|
|
RUN echo 'alias python="python3"' >> ~/.zshrc
|
|
RUN echo 'alias pip="pip3"' >> ~/.bashrc
|
|
RUN echo 'alias pip="pip3"' >> ~/.zshrc
|
|
|
|
|
|
RUN apt-get install -y openssh-server
|
|
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
|
|
|
|
|
|
ENTRYPOINT ["/bin/bash"]
|