You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.2 KiB
Docker

FROM pytorch/pytorch:2.0.0-cuda11.7-cudnn8-runtime
ENV TZ=Europe/Samara
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
2 years ago
ARG USER
ARG GROUP
ARG UID
ARG GID
RUN apt update
RUN apt install sudo -y
RUN sed -i 's/^%sudo.*/%sudo ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers
2 years ago
RUN groupadd --gid ${GID} ${GROUP}
RUN useradd --shell /bin/bash --uid ${UID} --gid ${GID} -G sudo --create-home ${USER}
2 years ago
RUN mkdir /wd
RUN chown ${USER}:${GROUP} /wd
# SYSTEM CONFIGURATION
RUN apt install vim htop mc curl wget git tree -y
RUN curl -fsSL https://code-server.dev/install.sh | sh
2 years ago
USER ${USER}
# USER CONFIGURATION
# RUN ...
RUN code-server --install-extension ms-python.python
2 years ago
RUN openssl req -x509 -newkey rsa:4096 -keyout /home/${USER}/key.pem -out /home/${USER}/cert.pem -sha256 -nodes -days 365 -subj "/C=RU/ST=SamaraRegion/L=Samara/O=SSAU/OU=LIAV/CN=vscode.ssau.ru/"
RUN mkdir -p /home/${USER}/.config/code-server
RUN echo 'bind-addr: 0.0.0.0:8443' >> /home/${USER}/.config/code-server/config.yaml
RUN echo "cert: /home/${USER}/cert.pem" >> /home/${USER}/.config/code-server/config.yaml
RUN echo "cert-key: /home/${USER}/key.pem" >> /home/${USER}/.config/code-server/config.yaml
ENV SHELL=/bin/bash
2 years ago
SHELL ["/bin/bash", "--login", "-i", "-c"]
WORKDIR /wd