mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-12 03:49:06 +08:00
Fixed huggingface url (#2667)
### What problem does this PR solve? Fixed huggingface url. Close #2665 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
9081150c2c
commit
5b4b252895
16
Dockerfile
16
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
|
||||
|
@ -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
|
||||
|
@ -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) 文件当中的系统配置保持一致。
|
||||
|
||||
|
@ -14,7 +14,7 @@ repos = [
|
||||
|
||||
|
||||
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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user