Linux无交互自动安装miniconda3
一、普通执行
# 下载miniconda3
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py311_23.9.0-0-Linux-x86_64.sh
# 自动安装miniconda3至/opt/miniconda3目录下
bash Miniconda3-py311_23.9.0-0-Linux-x86_64.sh -p /opt/miniconda3 -b
# 执行codna初始化
/opt/miniconda3/bin/conda init bash
-b
禁用交互界面,就省去交互的过程了-p
指定安装路径
二、dockerfile
主要用于构建容器时自动安装miniconda3
RUN wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py311_23.9.0-0-Linux-x86_64.sh && \
bash Miniconda3-py311_23.9.0-0-Linux-x86_64.sh -p /opt/miniconda3 -b && \
/opt/miniconda3/bin/conda init bash