1、说明
平台基础镜像已经安装的Miniconda3,但是安装路径是在系统盘,后期用户可能会出现系统盘资源紧张的问题。
所以出此教程把Miniconda3安装在/kp-data数据盘。
2、Miniconda3安装文件下载
https://repo.anaconda.com/miniconda/
选择https://repo.anaconda.com/miniconda/Miniconda3-py311_25.1.1-0-Linux-x86_64.sh 这个安装脚本
3、安装步骤
cd /kp-data/
wget https://repo.anaconda.com/miniconda/Miniconda3-py311_25.1.1-0-Linux-x86_64.sh
运行脚本
bash Miniconda3-py311_25.1.1-0-Linux-x86_64.sh
Please, press ENTER to continue #按回车继续
按空格健多次,阅读服务条款
Do you accept the license terms? [yes|no] #选择yes
Miniconda3 will now be installed into this location #这里不能默认,输入/kp-data/miniconda3回车
You can undo this by running `conda init --reverse $SHELL`? [yes|no] #默认no
Thank you for installing Miniconda3! #看到这句话说明安装成功了
/kp-data/miniconda3/bin/conda init #激活conda
source /root/.bashrc #刷新环境变量
检测:
conda --version #看到版本是25.1.1就是可以了
4、设置Miniconda的镜像源
清华镜像源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes
中科大镜像源
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/
5、查看目前镜像源有哪些
conda config --show channels
清除索引缓存
conda clean -i
换回默认下载源
conda config --remove-key channels
6、设置pip源 #使用实例自带pip可以不用设置,实例pip、python版本和conda所带大版本一直
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
pip config set install.trusted-host mirrors.aliyun.com
7、测试安装comfyui
cd /kp-data/
conda create -n comfyui
environment location: /kp-data/miniconda3/envs/comfyui #默认是y,直接回车
conda activate comfyui
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI/
python main.py
pip install safetensors einops transformers scipy torchsde aiohttp #提示要安装的依赖包
To see the GUI go to: http://127.0.0.1:8188 #出现这个提示就ok了