20 lines
570 B
Bash
20 lines
570 B
Bash
# 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
|
|
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh
|
|
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc
|
|
. /opt/conda/etc/profile.d/conda.sh
|
|
conda init bash
|
|
conda config --set show_channel_urls true
|
|
# 配置 .condarc 文件
|
|
cat <<EOF > ~/.condarc
|
|
channels:
|
|
- conda-forge
|
|
- bioconda
|
|
- pytorch
|
|
- pytorch-nightly
|
|
- nvidia
|
|
- defaults
|
|
show_channel_urls: true
|
|
EOF |