浏览代码

Replaced pypi.tuna.tsinghua.edu.cn with mirrors.aliyun.com/pypi (#5309)

### What problem does this PR solve?

Replaced pypi.tuna.tsinghua.edu.cn with mirrors.aliyun.com/pypi.
I notice aliyun.com sometimes is much faster than tsinghua.edu.

### Type of change

- [x] Refactoring
tags/v0.17.0
Zhichang Yu 8 个月前
父节点
当前提交
eb72d598b1
没有帐户链接到提交者的电子邮件
共有 4 个文件被更改,包括 3081 次插入3081 次删除
  1. 5
    5
      Dockerfile
  2. 1
    1
      README_tzh.md
  3. 1
    1
      README_zh.md
  4. 3074
    3074
      uv.lock

+ 5
- 5
Dockerfile 查看文件

@@ -62,11 +62,11 @@ RUN --mount=type=cache,id=ragflow_apt,target=/var/cache/apt,sharing=locked \
apt install -y python3-pip pipx nginx unzip curl wget git vim less

RUN if [ "$NEED_MIRROR" == "1" ]; then \
pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && \
pip3 config set global.trusted-host pypi.tuna.tsinghua.edu.cn; \
pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple && \
pip3 config set global.trusted-host mirrors.aliyun.com; \
mkdir -p /etc/uv && \
echo "[[index]]" > /etc/uv/uv.toml && \
echo 'url = "https://pypi.tuna.tsinghua.edu.cn/simple"' >> /etc/uv/uv.toml && \
echo 'url = "https://mirrors.aliyun.com/pypi/simple"' >> /etc/uv/uv.toml && \
echo "default = true" >> /etc/uv/uv.toml; \
fi; \
pipx install uv
@@ -150,9 +150,9 @@ COPY pyproject.toml uv.lock ./
# uv records index url into uv.lock but doesn't failover among multiple indexes
RUN --mount=type=cache,id=ragflow_uv,target=/root/.cache/uv,sharing=locked \
if [ "$NEED_MIRROR" == "1" ]; then \
sed -i 's|pypi.org|pypi.tuna.tsinghua.edu.cn|g' uv.lock; \
sed -i 's|pypi.org|mirrors.aliyun.com/pypi|g' uv.lock; \
else \
sed -i 's|pypi.tuna.tsinghua.edu.cn|pypi.org|g' uv.lock; \
sed -i 's|mirrors.aliyun.com/pypi|pypi.org|g' uv.lock; \
fi; \
if [ "$LIGHTEN" == "1" ]; then \
uv sync --python 3.10 --frozen; \

+ 1
- 1
README_tzh.md 查看文件

@@ -266,7 +266,7 @@ docker build --build-arg NEED_MIRROR=1 -f Dockerfile -t infiniflow/ragflow:night

```bash
pipx install uv
export UV_INDEX=https://pypi.tuna.tsinghua.edu.cn/simple
export UV_INDEX=https://mirrors.aliyun.com/pypi/simple
```

2. 下載原始碼並安裝 Python 依賴:

+ 1
- 1
README_zh.md 查看文件

@@ -267,7 +267,7 @@ docker build --build-arg NEED_MIRROR=1 -f Dockerfile -t infiniflow/ragflow:night

```bash
pipx install uv
export UV_INDEX=https://pypi.tuna.tsinghua.edu.cn/simple
export UV_INDEX=https://mirrors.aliyun.com/pypi/simple
```

2. 下载源代码并安装 Python 依赖:

+ 3074
- 3074
uv.lock
文件差异内容过多而无法显示
查看文件


正在加载...
取消
保存