update python3 python3-pip

This commit is contained in:
2024-06-20 16:17:03 +08:00
parent 3320482e12
commit 2be8ab5de0

View File

@@ -14,13 +14,33 @@ COPY id_rsa.pub /root/.ssh/
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
apt-get install -y wget curl git git-lfs jq vim bash libaio-dev build-essential openssh-server lsof python3 python3-pip
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
mkdir -p ~/.pip
# install miniconda
wget -qO- https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh
bash /tmp/miniconda.sh -b -p /opt/conda
rm /tmp/miniconda.sh
conda init bash
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc
echo "conda activate ${CONDA_ENV_NAME}" >> ~/.bashrc
# 配置 .condarc 文件
cat <<EOF > ~/.condarc
channels:
- conda-forge
- bioconda
- pytorch
- pytorch-nightly
- nvidia
- defaults
show_channel_urls: true
EOF
# 安装 micromamba 并配置 mambarc
echo 1 | bash <(curl -s https://cdn.jsdelivr.net/gh/hotwa/MicroMamba_Installer@main/install.sh)
micromamba shell init -s bash -p ~/micromamba