Change index url per NEED_MIRROR (#4515)
Browse files### What problem does this PR solve?
Change index url per NEED_MIRROR. Close #4507
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
- Dockerfile +7 -0
Dockerfile
CHANGED
@@ -130,7 +130,14 @@ WORKDIR /ragflow
|
|
130 |
# install dependencies from uv.lock file
|
131 |
COPY pyproject.toml uv.lock ./
|
132 |
|
|
|
|
|
133 |
RUN --mount=type=cache,id=ragflow_uv,target=/root/.cache/uv,sharing=locked \
|
|
|
|
|
|
|
|
|
|
|
134 |
if [ "$LIGHTEN" == "1" ]; then \
|
135 |
uv sync --python 3.10 --frozen; \
|
136 |
else \
|
|
|
130 |
# install dependencies from uv.lock file
|
131 |
COPY pyproject.toml uv.lock ./
|
132 |
|
133 |
+
# https://github.com/astral-sh/uv/issues/10462
|
134 |
+
# uv records index url into uv.lock but doesn't failover among multiple indexes
|
135 |
RUN --mount=type=cache,id=ragflow_uv,target=/root/.cache/uv,sharing=locked \
|
136 |
+
if [ "$NEED_MIRROR" == "1" ]; then \
|
137 |
+
sed -i 's|pypi.org|pypi.tuna.tsinghua.edu.cn|g' uv.lock; \
|
138 |
+
else \
|
139 |
+
sed -i 's|pypi.tuna.tsinghua.edu.cn|pypi.org|g' uv.lock; \
|
140 |
+
fi; \
|
141 |
if [ "$LIGHTEN" == "1" ]; then \
|
142 |
uv sync --python 3.10 --frozen; \
|
143 |
else \
|