File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,10 +8,12 @@ COPY distribution/constraints.txt ${APP_ROOT}/constraints.txt
88COPY distribution/requirements.txt ${APP_ROOT}/requirements.txt
99
1010# Package docling transitively pulls in opencv-python via rapidocr.
11- # opencv-python requires libGL.so.1 (absent in UBI). Swap it for the headless variant after install
11+ # opencv-python requires libGL.so.1 (absent in UBI). Swap it for the headless
12+ # variant after install, pinned to the exact version the resolver chose.
1213RUN uv pip install --constraint ${APP_ROOT}/constraints.txt -r ${APP_ROOT}/requirements.txt \
14+ && OPENCV_VERSION=$(uv pip show opencv-python 2>/dev/null | awk '/^Version:/{print $2}' ) \
1315 && uv pip uninstall opencv-python \
14- && uv pip install opencv-python-headless
16+ && uv pip install --constraint ${APP_ROOT}/constraints.txt " opencv-python-headless==${OPENCV_VERSION}"
1517
1618COPY distribution/fetch_artifacts.py ${APP_ROOT}/fetch_artifacts.py
1719COPY --chmod=755 distribution/copy-artifacts.sh ${APP_ROOT}/copy-artifacts.sh
Original file line number Diff line number Diff line change @@ -6,10 +6,12 @@ COPY distribution/constraints.txt ${APP_ROOT}/constraints.txt
66COPY distribution/requirements.txt ${APP_ROOT}/requirements.txt
77
88# Package docling transitively pulls in opencv-python via rapidocr.
9- # opencv-python requires libGL.so.1 (absent in UBI). Swap it for the headless variant after install
9+ # opencv-python requires libGL.so.1 (absent in UBI). Swap it for the headless
10+ # variant after install, pinned to the exact version the resolver chose.
1011RUN uv pip install --constraint ${APP_ROOT}/constraints.txt -r ${APP_ROOT}/requirements.txt \
12+ && OPENCV_VERSION=$(uv pip show opencv-python 2>/dev/null | awk '/^Version:/{print $2}') \
1113 && uv pip uninstall opencv-python \
12- && uv pip install opencv-python-headless
14+ && uv pip install --constraint ${APP_ROOT}/constraints.txt " opencv-python-headless==${OPENCV_VERSION}"
1315
1416COPY distribution/fetch_artifacts.py ${APP_ROOT}/fetch_artifacts.py
1517COPY --chmod=755 distribution/copy-artifacts.sh ${APP_ROOT}/copy-artifacts.sh
You can’t perform that action at this time.
0 commit comments