|
|
|
@@ -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; \ |