mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 15:31:05 +08:00
Docs: update python version to 3.13 (#15103)
### What problem does this PR solve? 1. update python version to 3.13 2. upgrade ormsgpack to 1.6.0 ### Type of change - [x] Refactoring --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -34,7 +34,7 @@ The project uses **uv** for dependency management.
|
||||
|
||||
1. **Setup Environment**:
|
||||
```bash
|
||||
uv sync --python 3.12 --all-extras
|
||||
uv sync --python 3.13 --all-extras
|
||||
uv run python3 download_deps.py
|
||||
```
|
||||
|
||||
|
||||
@@ -328,7 +328,7 @@ docker build --platform linux/amd64 \
|
||||
```bash
|
||||
git clone https://github.com/infiniflow/ragflow.git
|
||||
cd ragflow/
|
||||
uv sync --python 3.12 # install RAGFlow dependent python modules
|
||||
uv sync --python 3.13 # install RAGFlow dependent python modules
|
||||
uv run python3 download_deps.py
|
||||
pre-commit install
|
||||
```
|
||||
|
||||
@@ -328,7 +328,7 @@ docker build --platform linux/amd64 \
|
||||
```bash
|
||||
git clone https://github.com/infiniflow/ragflow.git
|
||||
cd ragflow/
|
||||
uv sync --python 3.12 # install RAGFlow dependent python modules
|
||||
uv sync --python 3.13 # install RAGFlow dependent python modules
|
||||
uv run python3 download_deps.py
|
||||
pre-commit install
|
||||
```
|
||||
|
||||
@@ -319,7 +319,7 @@ docker build --platform linux/amd64 \
|
||||
```bash
|
||||
git clone https://github.com/infiniflow/ragflow.git
|
||||
cd ragflow/
|
||||
uv sync --python 3.12 # install RAGFlow dependent python modules
|
||||
uv sync --python 3.13 # install RAGFlow dependent python modules
|
||||
uv run python3 download_deps.py
|
||||
pre-commit install
|
||||
```
|
||||
|
||||
@@ -302,7 +302,7 @@ docker build --platform linux/amd64 \
|
||||
```bash
|
||||
git clone https://github.com/infiniflow/ragflow.git
|
||||
cd ragflow/
|
||||
uv sync --python 3.12 # install RAGFlow dependent python modules
|
||||
uv sync --python 3.13 # install RAGFlow dependent python modules
|
||||
uv run python3 download_deps.py
|
||||
pre-commit install
|
||||
```
|
||||
|
||||
@@ -302,7 +302,7 @@ docker build --platform linux/amd64 \
|
||||
```bash
|
||||
git clone https://github.com/infiniflow/ragflow.git
|
||||
cd ragflow/
|
||||
uv sync --python 3.12 # install RAGFlow dependent python modules
|
||||
uv sync --python 3.13 # install RAGFlow dependent python modules
|
||||
uv run python3 download_deps.py
|
||||
pre-commit install
|
||||
```
|
||||
|
||||
@@ -297,7 +297,7 @@ docker build --platform linux/amd64 \
|
||||
```bash
|
||||
git clone https://github.com/infiniflow/ragflow.git
|
||||
cd ragflow/
|
||||
uv sync --python 3.12 # install RAGFlow dependent python modules
|
||||
uv sync --python 3.13 # install RAGFlow dependent python modules
|
||||
uv run python3 download_deps.py
|
||||
pre-commit install
|
||||
```
|
||||
|
||||
@@ -319,7 +319,7 @@ docker build --platform linux/amd64 \
|
||||
```bash
|
||||
git clone https://github.com/infiniflow/ragflow.git
|
||||
cd ragflow/
|
||||
uv sync --python 3.12 # instala os módulos Python dependentes do RAGFlow
|
||||
uv sync --python 3.13 # instala os módulos Python dependentes do RAGFlow
|
||||
uv run python3 download_deps.py
|
||||
pre-commit install
|
||||
```
|
||||
|
||||
@@ -323,7 +323,7 @@ docker build --platform linux/amd64 \
|
||||
```bash
|
||||
git clone https://github.com/infiniflow/ragflow.git
|
||||
cd ragflow/
|
||||
uv sync --python 3.12 # RAGFlow'un bağımlı Python modüllerini yükler
|
||||
uv sync --python 3.13 # RAGFlow'un bağımlı Python modüllerini yükler
|
||||
uv run python3 download_deps.py
|
||||
pre-commit install
|
||||
```
|
||||
|
||||
@@ -329,7 +329,7 @@ docker build --platform linux/amd64 \
|
||||
```bash
|
||||
git clone https://github.com/infiniflow/ragflow.git
|
||||
cd ragflow/
|
||||
uv sync --python 3.12 # install RAGFlow dependent python modules
|
||||
uv sync --python 3.13 # install RAGFlow dependent python modules
|
||||
uv run python3 download_deps.py
|
||||
pre-commit install
|
||||
```
|
||||
|
||||
@@ -329,7 +329,7 @@ docker build --platform linux/amd64 \
|
||||
```bash
|
||||
git clone https://github.com/infiniflow/ragflow.git
|
||||
cd ragflow/
|
||||
uv sync --python 3.12 # install RAGFlow dependent python modules
|
||||
uv sync --python 3.13 # install RAGFlow dependent python modules
|
||||
uv run python3 download_deps.py
|
||||
pre-commit install
|
||||
```
|
||||
|
||||
@@ -41,7 +41,7 @@ def encrypt_password(password_plain: str) -> str:
|
||||
return base64.b64encode(encrypted_password).decode('utf-8')
|
||||
except Exception as exc:
|
||||
raise AuthException(
|
||||
"Password encryption unavailable; install pycryptodomex (uv sync --python 3.12 --group test)."
|
||||
"Password encryption unavailable; install pycryptodomex (uv sync --python 3.13 --group test)."
|
||||
) from exc
|
||||
return crypt(password_plain)
|
||||
|
||||
|
||||
@@ -46,14 +46,14 @@ cd ragflow/
|
||||
2. Install RAGFlow service's Python dependencies:
|
||||
|
||||
```bash
|
||||
uv sync --python 3.12 --frozen
|
||||
uv sync --python 3.13 --frozen
|
||||
```
|
||||
*A virtual environment named `.venv` is created, and all Python dependencies are installed into the new environment.*
|
||||
|
||||
If you need to run tests against the RAGFlow service, install the test dependencies:
|
||||
|
||||
```bash
|
||||
uv sync --python 3.12 --group test --frozen && uv pip install sdk/python --group test
|
||||
uv sync --python 3.13 --group test --frozen && uv pip install sdk/python --group test
|
||||
```
|
||||
|
||||
### Launch third-party services
|
||||
|
||||
@@ -178,7 +178,7 @@ This section is contributed by our community contributor [yiminghub2024](https:/
|
||||
iii. Copy [docker/entrypoint.sh](https://github.com/infiniflow/ragflow/blob/main/docker/entrypoint.sh) locally.
|
||||
iv. Install the required dependencies using `uv`:
|
||||
- Run `uv add mcp` or
|
||||
- Copy [pyproject.toml](https://github.com/infiniflow/ragflow/blob/main/pyproject.toml) locally and run `uv sync --python 3.12`.
|
||||
- Copy [pyproject.toml](https://github.com/infiniflow/ragflow/blob/main/pyproject.toml) locally and run `uv sync --python 3.13`.
|
||||
2. Edit **docker-compose.yml** to enable MCP (disabled by default).
|
||||
3. Launch the MCP server:
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ dependencies = [
|
||||
"opencv-python-headless==4.10.0.84",
|
||||
"opendal>=0.45.0,<0.46.0",
|
||||
"opensearch-py==2.7.1",
|
||||
"ormsgpack>=1.5.0",
|
||||
"ormsgpack>=1.6.0",
|
||||
"pdfplumber==0.10.4",
|
||||
"pluginlib>=0.10.0",
|
||||
"psycopg2-binary>=2.9.11,<3.0.0",
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
**Install Python dependencies (including test dependencies):**
|
||||
|
||||
```bash
|
||||
uv sync --python 3.12 --only-group test --no-default-groups --frozen
|
||||
uv sync --python 3.13 --only-group test --no-default-groups --frozen
|
||||
|
||||
```
|
||||
|
||||
|
||||
@@ -251,7 +251,7 @@ These scripts create a dataset,
|
||||
upload/parse docs from test/benchmark/test_docs, run the benchmark, and clean up.
|
||||
The both script runs retrieval then chat on the same dataset, then deletes it.
|
||||
|
||||
- Make sure to run ```uv sync --python 3.12 --group test ``` before running the commands.
|
||||
- Make sure to run ```uv sync --python 3.13 --group test ``` before running the commands.
|
||||
- It is also necessary to run these commands prior to initializing your containers if you plan on using the built-in embedded model: ```echo -e "TEI_MODEL=BAAI/bge-small-en-v1.5" >> docker/.env```
|
||||
and ```echo -e "COMPOSE_PROFILES=\${COMPOSE_PROFILES},tei-cpu" >> docker/.env```
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ def encrypt_password(password_plain: str) -> str:
|
||||
from api.utils.crypt import crypt
|
||||
except Exception as exc:
|
||||
raise AuthError(
|
||||
"Password encryption unavailable; install pycryptodomex (uv sync --python 3.12 --group test)."
|
||||
"Password encryption unavailable; install pycryptodomex (uv sync --python 3.13 --group test)."
|
||||
) from exc
|
||||
return crypt(password_plain)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user