Created
April 7, 2025 04:43
-
-
Save swdee/f51fd2fb571c5141c99c04c0ecf3ef95 to your computer and use it in GitHub Desktop.
WIP dockerfile for rknn-toolkit2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.11-bookworm | |
# Set the working directory | |
WORKDIR /app | |
# Set environment variable for the wheel filename | |
ENV WHEEL_FILENAME=rknn_toolkit2-2.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | |
ENV REQ_FILENAME=requirements_cp311-2.3.0.txt | |
# Install dependencies | |
RUN apt-get update && \ | |
apt-get install -y wget libgl1 && \ | |
rm -rf /var/lib/apt/lists/* | |
# Download the requirements file for rknn-toolkit2 | |
RUN wget -O requirements.txt \ | |
https://raw.githubusercontent.com/airockchip/rknn-toolkit2/master/rknn-toolkit2/packages/x86_64/$REQ_FILENAME | |
# Install the Python dependencies from the requirements file | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Download the rknn-toolkit2 wheel package | |
RUN wget -O $WHEEL_FILENAME \ | |
"https://github.com/airockchip/rknn-toolkit2/raw/refs/heads/master/rknn-toolkit2/packages/x86_64/$WHEEL_FILENAME" | |
# Install the rknn-toolkit2 wheel package | |
RUN pip install --no-cache-dir $WHEEL_FILENAME | |
# Set a default command | |
CMD ["python3"] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment