AI开发平台MODELARTS-Open-Sora 1.0基于DevServer适配PyTorch NPU训练指导(6.3.905):Step3 获取代码包并安装依赖

时间:2024-11-12 16:42:19

Step3 获取代码包并安装依赖

  1. 下载插件代码包AscendCloud-3rdAIGC-6.3.905-xxx.zip文件,上传到容器的/home/ma-user/目录下,解压并安装相关依赖。获取路径参见获取软件和镜像
    mkdir -p /home/ma-user/ascendcloud-aigc-algorithm-open_sora    #创建目录
    cd /home/ma-user/ascendcloud-aigc-algorithm-open_sora/          #进入目录
    
    unzip -zxvf AscendCloud-3rdAIGC-6.3.905-*.zip
    tar -zxvf ascendcloud-aigc-algorithm-open_sora.tar.gz
    rm -rf AscendCloud-3rdAIGC-6.3.905-*
  2. 安装Python环境。
    pip install -r requirements.txt
    cp attention_processor.py /home/ma-user/anaconda3/envs/PyTorch-2.1.0/lib/python3.9/site-packages/diffusers/models/attention_processor.py
    cp low_level_optim.py /home/ma-user/anaconda3/envs/PyTorch-2.1.0/lib/python3.9/site-packages/colossalai/zero/low_level/low_level_optim.py
support.huaweicloud.com/bestpractice-modelarts/modelarts_10_01203.html