Dockerfile优化install bench写法

This commit is contained in:
jingrow 2025-08-22 06:22:18 +08:00
parent aaadc69f14
commit 5f9ccc5ce9

View File

@ -195,7 +195,10 @@ RUN python${PYTHON_VERSION} -m pip config set global.trusted-host pypi.tuna.tsin
ENV {{ pg.get_dependency_version("bench", True) }}
# Now bench install command can use the environment variables
RUN --mount=type=cache,target=/home/jingrow/.cache,uid=1000,gid=1000 python${PYTHON_VERSION} -m pip install --upgrade --resume-retries 5 --timeout 100 git+http://git.jingrow.com/jingrow/bench.git || python${PYTHON_VERSION} -m pip install --upgrade --resume-retries 5 --timeout 100 git+http://$GIT_USERNAME:$GIT_ACCESS_TOKEN@git.jingrow.com/jingrow/bench.git `#stage-bench-bench`
RUN --mount=type=cache,target=/home/jingrow/.cache,uid=1000,gid=1000 \
python${PYTHON_VERSION} -m pip install --upgrade --resume-retries 5 --timeout 100 \
git+http://${GIT_USERNAME:+$GIT_USERNAME:$GIT_ACCESS_TOKEN@}git.jingrow.com/jingrow/bench.git \
`#stage-bench-bench`
RUN --mount=type=cache,target=/home/jingrow/.cache,uid=1000,gid=1000 python${PYTHON_VERSION} -m pip install Jinja2~=3.0.3
RUN --mount=type=cache,target=/home/jingrow/.cache,uid=1000,gid=1000 python${PYTHON_VERSION} -m pip install --upgrade setuptools