Skip to content

Commit fc3cde5

Browse files
authored
Merge pull request #269 from supabase/fix-x86-docker
fix: installation of onnx runtime in x86 plaforms
2 parents e373fb7 + 858ce40 commit fc3cde5

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry,id=${TARGETPLATFORM} --m
1212
GIT_V_TAG=${GIT_V_VERSION} cargo build --release && \
1313
cargo strip && \
1414
mv /usr/src/edge-runtime/target/release/edge-runtime /root
15-
RUN curl -O https://registry.npmjs.org/onnxruntime-node/-/onnxruntime-node-${ONNXRUNTIME_VERSION}.tgz && tar zxvf onnxruntime-node-${ONNXRUNTIME_VERSION}.tgz && \
16-
mv ./package/bin/napi-v3/$TARGETPLATFORM/libonnxruntime.so.${ONNXRUNTIME_VERSION} /root/libonnxruntime.so
15+
RUN ./scripts/install_onnx.sh $ONNXRUNTIME_VERSION $TARGETPLATFORM /root/libonnxruntime.so
1716

1817

1918
FROM debian:bookworm-slim

scripts/install_onnx.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
curl -O https://registry.npmjs.org/onnxruntime-node/-/onnxruntime-node-$1.tgz && tar zxvf onnxruntime-node-$1.tgz
4+
5+
if [ "$2" == "linux/arm64" ]; then
6+
mv ./package/bin/napi-v3/linux/arm64/libonnxruntime.so.$1 $3
7+
else
8+
mv ./package/bin/napi-v3/linux/x64/libonnxruntime.so.$1 $3
9+
fi

0 commit comments

Comments
 (0)