Files
cdc_dockerfile/Dockerfile.ldh
2024-06-12 14:56:55 +08:00

29 lines
883 B
Docker

# syntax=docker/dockerfile:1
FROM nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04
ENV MAMBA_ROOT_PREFIX=~/micromamba
ENV PATH="/usr/local/bin:$PATH"
RUN <<EOT
#!/bin/bash
apt-get update
apt-get install -y wget curl git git-lfs jq vim bash libaio-dev build-essential openssh-server lsof
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config
echo "PubkeyAuthentication yes" >> /etc/ssh/sshd_config
echo "Port 22" >> /etc/ssh/sshd_config
mkdir /var/run/sshd
echo 'root:cdcdocker' | chpasswd
# Install Micromamba
echo 1 | bash <(curl -s https://cdn.jsdelivr.net/gh/hotwa/MicroMamba_Installer@main/install.sh)
micromamba shell init -s bash -p ~/micromamba
mkdir -p ~/.pip
echo "
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
" >> ~/.pip/pip.conf
EOT
CMD ["/usr/sbin/sshd", "-D"]