Snow2222 commited on
Commit
3f66e8a
·
verified ·
1 Parent(s): 7d3f21f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -4
Dockerfile CHANGED
@@ -9,18 +9,18 @@ RUN apt-get update && apt-get install -y \
9
  curl \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
- # 设置缓存目录并创建目录,使用 HF_HOME
13
- ENV HF_HOME=/root/.cache/huggingface
14
 
15
  # 创建缓存目录并设置权限
16
- RUN mkdir -p /root/.cache/huggingface && chmod -R 777 /root/.cache/huggingface
17
 
18
  # 创建并进入工作目录
19
  WORKDIR /app
20
 
21
  # 安装依赖
22
  RUN pip install --upgrade pip
23
- RUN pip install torch transformers peft datasets accelerate bitsandbytes
24
 
25
  # 将代码和数据复制到容器中
26
  COPY . /app
 
9
  curl \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # 设置缓存目录并使用 HF_HOME 环境变量(推荐使用 HF_HOME)
13
+ ENV HF_HOME=/tmp/huggingface_cache
14
 
15
  # 创建缓存目录并设置权限
16
+ RUN mkdir -p /tmp/huggingface_cache && chmod -R 777 /tmp/huggingface_cache
17
 
18
  # 创建并进入工作目录
19
  WORKDIR /app
20
 
21
  # 安装依赖
22
  RUN pip install --upgrade pip
23
+ RUN pip install torch transformers peft datasets accelerate bitsandbytes huggingface_hub
24
 
25
  # 将代码和数据复制到容器中
26
  COPY . /app