File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -43,11 +43,16 @@ COPY requirements.txt .
4343# Use --no-cache-dir to keep image small
4444RUN 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
5358COPY lib/librknnrt.so /usr/lib/
You can’t perform that action at this time.
0 commit comments