beishancheng commited on
Commit
4d348c0
·
verified ·
1 Parent(s): bb42b16

Create Dockerfile

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