Skip to content

Commit f2abd0b

Browse files
committed
update:docker.yml
1 parent d17b7b3 commit f2abd0b

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

.github/workflows/docker.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,5 @@ jobs:
5656
tags: ${{ steps.meta.outputs.tags }}
5757
labels: ${{ steps.meta.outputs.labels }}
5858
cache-from: type=gha
59-
cache-to: type=gha,mode=max
59+
cache-to: type=gha,mode=max
60+
platforms: linux/amd64,linux/arm64

benkend/yolo11.dockerfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,16 @@ COPY requirements.txt .
4343
# Use --no-cache-dir to keep image small
4444
RUN pip install --no-cache-dir -r requirements.txt
4545

46-
# Copy the RKNN Toolkit Lite2 wheel
47-
COPY package/rknn_toolkit_lite2-2.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl .
46+
# Copy RKNN Toolkit Lite2 wheel
47+
COPY package/rknn_toolkit_lite2-2.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl ./package/
4848

49-
# Install the local wheel
50-
RUN pip install --no-cache-dir rknn_toolkit_lite2-2.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
49+
# Install RKNN Toolkit Lite2 wheel only if on compatible architecture
50+
RUN if [ "$(dpkg --print-architecture)" = "arm64" ] || [ "$(dpkg --print-architecture)" = "aarch64" ]; then \
51+
pip install --no-cache-dir package/rknn_toolkit_lite2-2.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; \
52+
else \
53+
echo "Warning: RKNN toolkit not installed - incompatible architecture $(dpkg --print-architecture)"; \
54+
echo "Note: This Docker image will not support hardware acceleration on x86_64 systems"; \
55+
fi
5156

5257
# Copy librknnrt.so to /usr/lib/ from src/rk3588
5358
COPY lib/librknnrt.so /usr/lib/

0 commit comments

Comments
 (0)