Spaces:
Build error
Build error
File size: 822 Bytes
4d348c0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # 使用一个包含 Git 和 Git-LFS 的基础镜像
FROM alpine/git:latest
# 安装 git-lfs
RUN git lfs install
# 设置 Git 配置
RUN git config --global user.email "hf@space.com"
RUN git config --global user.name "HF Space"
# 克隆源仓库
RUN GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/ApacheOne/WAN_loRAs /app
# 进入仓库目录
WORKDIR /app
# 拉取所有 LFS 大文件
RUN git lfs pull
# 修改远程仓库地址,指向你的新仓库 beishancheng/WAN_LORA
# HF_TOKEN 会从 Space secrets 中自动获取
RUN git remote set-url origin https://dummy:${HF_TOKEN}@huggingface.co/beishancheng/WAN_LORA
# 推送所有内容到你的新仓库
RUN git push origin main --force
# 完成后打印信息
CMD echo "模型仓库复制完成!现在可以去 beishancheng/WAN_LORA 查看文件了。" |