You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
884 B
36 lines
884 B
FROM quay.io/nmasse-redhat/jetpack-multiarch:r36.4.0
|
|
|
|
ADD *.py *.jpg *.onnx requirements.txt /opt/app
|
|
WORKDIR /opt/app
|
|
RUN <<EOF
|
|
set -Eeu
|
|
|
|
# Tell dpkg-configure to avoid asking questions...
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
# No caching
|
|
export PIP_NO_CACHE_DIR=1
|
|
|
|
# Install git + pip
|
|
apt update
|
|
apt install -y git python3-pip
|
|
rm -rf /var/lib/apt/lists/*
|
|
apt-get clean
|
|
|
|
# Install Python dependencies
|
|
case "$(arch)" in
|
|
aarch64)
|
|
echo "Downloading onnxruntime_gpu from Nvidia"
|
|
wget -q https://nvidia.box.com/shared/static/i7n40ki3pl2x57vyn4u7e9asyiqlnl7n.whl -O onnxruntime_gpu-1.16.0-cp310-cp310-linux_aarch64.whl
|
|
pip3 install onnxruntime_gpu-1.16.0-cp310-cp310-linux_aarch64.whl
|
|
rm -f onnxruntime_gpu-1.16.0-cp310-cp310-linux_aarch64.whl
|
|
;;
|
|
x86_64)
|
|
pip3 install onnxruntime_gpu
|
|
;;
|
|
esac
|
|
pip3 install -r requirements.txt
|
|
EOF
|
|
|
|
ENTRYPOINT [ "python3", "app.py" ]
|
|
CMD [ ]
|
|
|