From f5f601935e08e9a40088c5015cfe2e0e667e9d02 Mon Sep 17 00:00:00 2001 From: Zhichang Yu Date: Sun, 29 Sep 2024 20:36:01 +0800 Subject: [PATCH] Fixed huggingface url. Close #2665 --- Dockerfile | 16 ++++++++-------- Dockerfile.slim | 6 +++--- README_zh.md | 2 +- download_deps.py | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 64e8a898bf..59706754cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -76,17 +76,17 @@ COPY pyproject.toml poetry.toml poetry.lock ./ # Copy models downloaded via download_deps.py RUN mkdir -p /ragflow/rag/res/deepdoc /root/.ragflow -RUN --mount=type=bind,source=huggingface.io,target=/huggingface.io \ +RUN --mount=type=bind,source=huggingface.co,target=/huggingface.co \ tar --exclude='.*' -cf - \ - /huggingface.io/InfiniFlow/text_concat_xgb_v1.0 \ - /huggingface.io/InfiniFlow/deepdoc \ + /huggingface.co/InfiniFlow/text_concat_xgb_v1.0 \ + /huggingface.co/InfiniFlow/deepdoc \ | tar -xf - --strip-components=3 -C /ragflow/rag/res/deepdoc -RUN --mount=type=bind,source=huggingface.io,target=/huggingface.io \ +RUN --mount=type=bind,source=huggingface.co,target=/huggingface.co \ tar -cf - \ - /huggingface.io/BAAI/bge-large-zh-v1.5 \ - /huggingface.io/BAAI/bge-reranker-v2-m3 \ - /huggingface.io/maidalun1020/bce-embedding-base_v1 \ - /huggingface.io/maidalun1020/bce-reranker-base_v1 \ + /huggingface.co/BAAI/bge-large-zh-v1.5 \ + /huggingface.co/BAAI/bge-reranker-v2-m3 \ + /huggingface.co/maidalun1020/bce-embedding-base_v1 \ + /huggingface.co/maidalun1020/bce-reranker-base_v1 \ | tar -xf - --strip-components=2 -C /root/.ragflow # Copy compiled web pages diff --git a/Dockerfile.slim b/Dockerfile.slim index 66eef46087..b657d9be66 100644 --- a/Dockerfile.slim +++ b/Dockerfile.slim @@ -76,10 +76,10 @@ COPY pyproject.toml poetry.toml poetry.lock ./ # Copy models downloaded via download_deps.py RUN mkdir -p /ragflow/rag/res/deepdoc /root/.ragflow -RUN --mount=type=bind,source=huggingface.io,target=/huggingface.io \ +RUN --mount=type=bind,source=huggingface.co,target=/huggingface.co \ tar --exclude='.*' -cf - \ - /huggingface.io/InfiniFlow/text_concat_xgb_v1.0 \ - /huggingface.io/InfiniFlow/deepdoc \ + /huggingface.co/InfiniFlow/text_concat_xgb_v1.0 \ + /huggingface.co/InfiniFlow/deepdoc \ | tar -xf - --strip-components=3 -C /ragflow/rag/res/deepdoc # Copy compiled web pages diff --git a/README_zh.md b/README_zh.md index f6ce0e7bbe..0547a8e2bc 100644 --- a/README_zh.md +++ b/README_zh.md @@ -182,7 +182,7 @@ 请务必确保 [.env](./docker/.env) 文件中的变量设置与 [service_conf.yaml](./docker/service_conf.yaml) 文件中的配置保持一致! -如果不能访问镜像站点hub.docker.com或者模型站点huggingface.io,请按照[.env](./docker/.env)注释修改`RAGFLOW_IMAGE`和`HF_ENDPOINT`。 +如果不能访问镜像站点hub.docker.com或者模型站点huggingface.co,请按照[.env](./docker/.env)注释修改`RAGFLOW_IMAGE`和`HF_ENDPOINT`。 > [./docker/README](./docker/README.md) 文件提供了环境变量设置和服务配置的详细信息。请**一定要**确保 [./docker/README](./docker/README.md) 文件当中列出来的环境变量的值与 [service_conf.yaml](./docker/service_conf.yaml) 文件当中的系统配置保持一致。 diff --git a/download_deps.py b/download_deps.py index 89d26addf9..03f52c84ca 100644 --- a/download_deps.py +++ b/download_deps.py @@ -14,7 +14,7 @@ def download_model(repo_id): - local_dir = os.path.join("huggingface.io", repo_id) + local_dir = os.path.join("huggingface.co", repo_id) os.makedirs(local_dir, exist_ok=True) snapshot_download(repo_id=repo_id, local_dir=local_dir)