From 72b875a1f7e01ffd5e3de753e5a3260e394ed0a8 Mon Sep 17 00:00:00 2001 From: mingzailao Date: Mon, 4 Dec 2023 20:50:07 -0500 Subject: [PATCH] no message --- .gitignore | 1 + Dockerfile | 29 ++++++++--------------------- 2 files changed, 9 insertions(+), 21 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9b89f28 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +conda/ diff --git a/Dockerfile b/Dockerfile index 1ec0b60..f5b3d3b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,34 +1,18 @@ 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 -y update && \ - apt-get -y upgrade && \ - apt-get install -y python3-pip python3-dev - -RUN apt-get install -y locales git vim nano - -RUN apt-get install -y zsh && apt-get install -y curl -RUN PATH="$PATH:/usr/bin/zsh" -RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" +RUN apt-get update +RUN apt-get install -y locales git vim nano zsh wget openssh-server && rm -rf /var/lib/apt/lists/* -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 @@ -38,6 +22,9 @@ ENV NOTVISIBLE "in users profile" RUN echo "export VISIBLE=now" >> /etc/profile EXPOSE 22 + RUN usermod -s /bin/zsh root -ENTRYPOINT ["/bin/zsh"] +ENTRYPOINT service ssh start && zsh + +