Skip to content

Commit 7a527a6

Browse files
committed
fix sam test import error
1 parent d82d24e commit 7a527a6

File tree

1 file changed

+5
-1
lines changed
  • label_studio_ml/examples/segment_anything_model

1 file changed

+5
-1
lines changed

label_studio_ml/examples/segment_anything_model/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ RUN --mount=type=cache,target="/var/cache/apt",sharing=locked \
2323
apt-get update; \
2424
apt-get upgrade -y; \
2525
apt install --no-install-recommends -y \
26-
wget git libopencv-dev cmake protobuf-compiler; \
26+
wget git libopencv-dev cmake protobuf-compiler execstack; \
2727
apt-get autoremove -y
2828

2929
# Copy and run the model download script
@@ -45,6 +45,10 @@ COPY requirements.txt .
4545
RUN --mount=type=cache,target=${PIP_CACHE_DIR},sharing=locked \
4646
pip install -r requirements.txt
4747

48+
# Fix executable stack issue with onnxruntime shared library
49+
RUN PYTHON_VER=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')") && \
50+
find /usr/local/lib/python${PYTHON_VER}/site-packages/onnxruntime/capi -name "onnxruntime_pybind11_state*.so" -exec execstack -c {} \; 2>/dev/null || true
51+
4852
# install test requirements if needed
4953
COPY requirements-test.txt .
5054
# build only when TEST_ENV="true"

0 commit comments

Comments
 (0)