jljiu commited on
Commit
b8a5778
·
verified ·
1 Parent(s): c0c1896

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -2
Dockerfile CHANGED
@@ -38,7 +38,7 @@ RUN wget --tries=3 --retry-connrefused --waitretry=5 --timeout=30 \
38
  https://huggingface.co/shenzhi-wang/Llama3.1-8B-Chinese-Chat/resolve/main/gguf/llama3.1_8b_chinese_chat_q4_0.gguf
39
 
40
  # 验证文件是否为GGUF格式
41
- RUN python3 -c '
42
  import sys
43
  def is_gguf(file_path):
44
  with open(file_path, "rb") as f:
@@ -47,7 +47,9 @@ def is_gguf(file_path):
47
  if not is_gguf("/app/model.gguf"):
48
  print("Error: Downloaded file is not in GGUF format")
49
  sys.exit(1)
50
- '
 
 
51
 
52
  # 将当前目录下的所有文件复制到容器内的/app目录
53
  COPY . /app
 
38
  https://huggingface.co/shenzhi-wang/Llama3.1-8B-Chinese-Chat/resolve/main/gguf/llama3.1_8b_chinese_chat_q4_0.gguf
39
 
40
  # 验证文件是否为GGUF格式
41
+ COPY <<-'EOF' /app/verify_gguf.py
42
  import sys
43
  def is_gguf(file_path):
44
  with open(file_path, "rb") as f:
 
47
  if not is_gguf("/app/model.gguf"):
48
  print("Error: Downloaded file is not in GGUF format")
49
  sys.exit(1)
50
+ EOF
51
+
52
+ RUN python3 /app/verify_gguf.py
53
 
54
  # 将当前目录下的所有文件复制到容器内的/app目录
55
  COPY . /app