Skip to content

Commit

Permalink
Fixed huggingface url. Close infiniflow#2665
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzhichang committed Sep 29, 2024
1 parent 4f52103 commit f5f6019
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.slim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) 文件当中的系统配置保持一致。
Expand Down
2 changes: 1 addition & 1 deletion download_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit f5f6019

Please sign in to comment.