Skip to content

Commit 406c25a

Browse files
committed
ensure OPENCV_VERSION variable is set after extraction
1 parent b19cf51 commit 406c25a

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

Containerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ COPY distribution/requirements.txt ${APP_ROOT}/requirements.txt
1212
# variant after install, pinned to the exact version the resolver chose.
1313
RUN uv pip install --constraint ${APP_ROOT}/constraints.txt -r ${APP_ROOT}/requirements.txt \
1414
&& OPENCV_VERSION=$(uv pip show opencv-python 2>/dev/null | awk '/^Version:/{print $2}') \
15+
&& [ -n "${OPENCV_VERSION}" ] || { echo "ERROR: opencv-python not found after install"; exit 1; } \
1516
&& uv pip uninstall opencv-python \
1617
&& uv pip install --constraint ${APP_ROOT}/constraints.txt "opencv-python-headless==${OPENCV_VERSION}"
1718

Containerfile.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ COPY distribution/requirements.txt ${APP_ROOT}/requirements.txt
1010
# variant after install, pinned to the exact version the resolver chose.
1111
RUN uv pip install --constraint ${APP_ROOT}/constraints.txt -r ${APP_ROOT}/requirements.txt \
1212
&& OPENCV_VERSION=$(uv pip show opencv-python 2>/dev/null | awk '/^Version:/{print $2}') \
13+
&& [ -n "${OPENCV_VERSION}" ] || { echo "ERROR: opencv-python not found after install"; exit 1; } \
1314
&& uv pip uninstall opencv-python \
1415
&& uv pip install --constraint ${APP_ROOT}/constraints.txt "opencv-python-headless==${OPENCV_VERSION}"
1516

0 commit comments

Comments
 (0)