Skip to content

fix: install pip in venv for runtime package installation#12668

Closed
VedantMadane wants to merge 2 commits intoinfiniflow:mainfrom
VedantMadane:fix/docker-pip-module
Closed

fix: install pip in venv for runtime package installation#12668
VedantMadane wants to merge 2 commits intoinfiniflow:mainfrom
VedantMadane:fix/docker-pip-module

Conversation

@VedantMadane
Copy link
Copy Markdown
Contributor

@VedantMadane VedantMadane commented Jan 16, 2026

Summary

This PR fixes the Docker build failure when running with USE_DOCLING=true .

Problem

After migrating to uv sync, the virtual environment no longer contains pip. However, the ensure_docling function in entrypoint.sh uses uv pip install at runtime to install the docling package when needed.

The error manifests as:

/ragflow/.venv/bin/python3: No module named pip

Solution

Add uv pip install pip after uv sync in the builder stage to ensure pip is available in the virtual environment for runtime package installation.

Changes to Dockerfile:

Added uv pip install pip after uv sync --python 3.12 --frozen

Fixes #12651

The uv sync command creates a minimal virtual environment without pip.
However, the ensure_docling function in entrypoint.sh uses 'uv pip install'
at runtime, which requires pip to be present in the target environment.

This change ensures pip is installed in the venv during the build stage,
allowing runtime package installation to work correctly when USE_DOCLING=true.

Fixes infiniflow#12651
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🐞 bug Something isn't working, pull request that fix bug. labels Jan 16, 2026
@KevinHuSh KevinHuSh closed this Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Docker build fails at runtime with "No module named pip" due to non-portable venv

2 participants