@@ -17,16 +17,15 @@ WORKDIR /app/lora-scripts
1717# pip config set install.trusted-host 'pypi.tuna.tsinghua.edu.cn'
1818
1919# 初次安装依赖
20- RUN pip install -r requirements.txt && pip install --force-reinstall xformers==v0 .0.27.post2 torch==2.4.0+cu121 torchvision==0.19 torchaudio==2.4.0+cu121 --index-url https://download.pytorch.org/whl/cu121 && rm -rf ~/.cache/pip/*
20+ RUN pip install xformers==0 .0.27.post2 --no-deps && pip install -r requirements.txt && rm -rf ~/.cache/pip/*
2121
2222# 更新 训练程序 stable 版本依赖
23- RUN rm -rf /app/lora-scripts/scripts/stable && cd /app/lora-scripts/scripts/ && git clone --recurse-submodules https://github.com/kohya-ss/sd-scripts.git stable
2423WORKDIR /app/lora-scripts/scripts/stable
2524RUN pip install -r requirements.txt && rm -rf ~/.cache/pip/*
2625
2726# 更新 训练程序 dev 版本依赖
28- # WORKDIR /app/lora-scripts/scripts/dev
29- # RUN pip install -r requirements.txt && rm -rf ~/.cache/pip/*
27+ WORKDIR /app/lora-scripts/scripts/dev
28+ RUN pip install -r requirements.txt && rm -rf ~/.cache/pip/*
3029
3130WORKDIR /app/lora-scripts
3231
@@ -35,9 +34,10 @@ WORKDIR /app/lora-scripts
3534# - https://soulteary.com/2024/01/07/fix-opencv-dependency-errors-opencv-fixer.html
3635# - https://blog.csdn.net/qq_50195602/article/details/124188467
3736RUN pip install opencv-fixer==0.2.5 && python -c "from opencv_fixer import AutoFix; AutoFix()" \
38- pip install opencv-python-headless onnxruntime onnxruntime-gpu && apt install ffmpeg libsm6 libxext6 libgl1 -y && apt-get clean && rm -rf /var/lib/apt/lists/* && rm -rf ~/.cache/pip/*
37+ pip install opencv-python-headless && apt install ffmpeg libsm6 libxext6 libgl1 -y && apt-get clean && rm -rf /var/lib/apt/lists/* && rm -rf ~/.cache/pip/*
38+
39+ RUN pip install onnxruntime onnxruntime-gpu && rm -rf ~/.cache/pip/*
3940
40- # 修改国内源
4141RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple
4242RUN pip config set install.trusted-host mirrors.aliyun.com
4343
0 commit comments