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 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 RUN groupadd --gid ${GID} ${GROUP} RUN useradd --shell /bin/bash --uid ${UID} --gid ${GID} -G sudo --create-home ${USER} 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 RUN curl -fsSL https://git.ai.ssau.ru/liav/docker_template/raw/branch/vscode/code_server_install.sh | sh RUN /opt/conda/bin/conda install -n base ipykernel --update-deps --force-reinstall -y USER ${USER} # USER CONFIGURATION # RUN ... 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 RUN code-server --install-extension ms-python.python ENV SHELL=/bin/bash SHELL ["/bin/bash", "--login", "-i", "-c"] WORKDIR /wd