From 6daae7f2263540f54aba1422e14ff199470bfbf3 Mon Sep 17 00:00:00 2001 From: Zhichang Yu Date: Sat, 15 Feb 2025 14:54:21 +0800 Subject: [PATCH] Added PEP 723 metadata to download_deps.py (#4988) ### What problem does this PR solve? Added PEP 723 metadata to download_deps.py ### Type of change - [x] Refactoring --- docs/guides/develop/build_docker_image.mdx | 3 +-- download_deps.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/guides/develop/build_docker_image.mdx b/docs/guides/develop/build_docker_image.mdx index bea9f4688..baf1d2543 100644 --- a/docs/guides/develop/build_docker_image.mdx +++ b/docs/guides/develop/build_docker_image.mdx @@ -57,8 +57,7 @@ While we also test RAGFlow on ARM64 platforms, we do not maintain RAGFlow Docker ```bash git clone https://github.com/infiniflow/ragflow.git cd ragflow/ -pip3 install huggingface_hub nltk -python3 download_deps.py +uv run download_deps.py docker build -f Dockerfile.deps -t infiniflow/ragflow_deps . docker build -f Dockerfile -t infiniflow/ragflow:nightly . docker build --build-arg LIGHTEN=1 -f Dockerfile -t infiniflow/ragflow:nightly-slim . diff --git a/download_deps.py b/download_deps.py index aa09c0ae5..7526af48a 100644 --- a/download_deps.py +++ b/download_deps.py @@ -1,8 +1,13 @@ #!/usr/bin/env python3 -# -# Install this script's dependencies with pip3: -# pip3 install huggingface-hub nltk +# PEP 723 metadata +# /// script +# requires-python = ">=3.10" +# dependencies = [ +# "huggingface-hub", +# "nltk", +# ] +# /// from huggingface_hub import snapshot_download import nltk