Skip to content

Commit 3ab9f84

Browse files
Dockerfile.vx-delegate build error fix (#4273)
- specify tensorflow version & bugfix
1 parent 7f9e492 commit 3ab9f84

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

core/iwasm/libraries/wasi-nn/test/Dockerfile.vx-delegate

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ RUN wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VER}/cmake-
3737
WORKDIR /tmp
3838
RUN git clone https://github.com/VeriSilicon/TIM-VX.git tim-vx \
3939
&& git clone https://github.com/VeriSilicon/tflite-vx-delegate.git \
40-
&& git clone https://github.com/tensorflow/tensorflow.git
40+
&& git clone https://github.com/tensorflow/tensorflow.git --branch v2.12.0
41+
42+
WORKDIR /tmp/tensorflow
43+
RUN git cherry-pick -n 5115fa96d7c5b41451674892317be43e30b7c389
4144

4245

4346
# Build TIM-VX
@@ -99,28 +102,24 @@ RUN cp --parents \
99102
ENV VIVANTE_SDK_DIR=/tmp/tim-vx/prebuilt-sdk/x86_64_linux/
100103
ENV VSIMULATOR_CONFIG=czl
101104

102-
ENV LD_LIBRARY_PATH=/tmp/tim-vx/prebuilt-sdk/x86_64_linux/lib:/usr/local/lib:/lib/x86_64-linux-gnu/:/lib64/:/usr/lib:$LD_LIBRARY_PATH
103-
104105
# Build WASI-NN
105106
WORKDIR /home/wamr
106107

107108
COPY . .
108109

109-
WORKDIR /home/wamr/core/iwasm/libraries/wasi-nn/test/build
110+
WORKDIR /home/wamr/product-mini/platforms/linux
110111

111-
# hadolint ignore=SC2086
112-
RUN cmake \
113-
-DCMAKE_LIBRARY_PATH=${CMAKE_LIBRARY_PATH}:/usr/local/lib/ \
114-
-DCMAKE_INCLUDE_PATH=${CMAKE_INCLUDE_PATH}:/usr/local/include/ \
112+
RUN rm -rf build \
113+
&& cmake -S . -B build\
114+
-DCMAKE_LIBRARY_PATH="/usr/local/lib/" \
115+
-DCMAKE_INCLUDE_PATH="/usr/local/include/" \
115116
-DWAMR_BUILD_WASI_NN=1 \
116117
-DWAMR_BUILD_WASI_NN_TFLITE=1\
117118
-DWAMR_BUILD_WASI_NN_ENABLE_EXT=1 \
118119
-DWASI_NN_EXT_DELEGATE_PATH="/usr/lib/libvx_delegate.so" \
119-
..
120-
121-
RUN make -j "$(grep -c ^processor /proc/cpuinfo)"
120+
&& cmake --build build -j "$(grep -c ^processor /proc/cpuinfo)"
122121

123-
RUN cp /home/wamr/core/iwasm/libraries/wasi-nn/test/build/iwasm /run/iwasm \
122+
RUN cp /home/wamr/product-mini/platforms/linux/build/iwasm /run/iwasm \
124123
&& cp /home/wamr/product-mini/platforms/linux/build/lib*.so /usr/lib
125124

126125
ENTRYPOINT [ "/run/iwasm" ]

0 commit comments

Comments
 (0)