1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
| FROM nvidia/cuda:11.8.0-devel-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
ARG http_proxy ARG https_proxy ARG HTTP_PROXY ARG HTTPS_PROXY
ENV http_proxy=${http_proxy} ENV https_proxy=${https_proxy} ENV HTTP_PROXY=${HTTP_PROXY} ENV HTTPS_PROXY=${HTTPS_PROXY}
RUN apt update && \ apt install -y \ ca-certificates \ curl \ gnupg \ lsb-release \ wget \ build-essential \ gdb \ sudo \ git \ libreadline-dev \ openssh-server \ vim && \ apt clean && \ rm -rf /var/lib/apt/lists/*
RUN mkdir /var/run/sshd && \ echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config && \ sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config && \ ssh-keygen -A
RUN useradd -ms /bin/bash siyuan && \ echo 'siyuan:zzzsy666' | chpasswd && \ echo 'siyuan ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
RUN mkdir -p /workspace && chown siyuan:siyuan /workspace
USER siyuan WORKDIR /workspace
ENV PATH="/home/siyuan/.local/bin:${PATH}"
RUN curl -fsSL https://xmake.io/shget.text | bash
RUN curl -L -o /home/siyuan/Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-$(uname -m).sh" && \ bash /home/siyuan/Miniforge3.sh -b -p /home/siyuan/miniforge3 && \ rm /home/siyuan/Miniforge3.sh
ENV PATH="/home/siyuan/miniforge3/bin:${PATH}"
ARG CACHEBUST=1
USER root
ENV PATH="/usr/local/cuda/bin:${PATH}"
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]
|