-
Notifications
You must be signed in to change notification settings - Fork 2.9k
/
Dockerfile.jetson
38 lines (31 loc) · 1.06 KB
/
Dockerfile.jetson
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# syntax=docker/dockerfile:experimental
#
# This Dockerfile just installs pre-built ONNX Runtime wheel inside the image.
# Please make sure you have nvidia-runtime enabled in docker config and then build like:
#
# sudo -H DOCKER_BUILDKIT=1 nvidia-docker build --build-arg WHEEL_FILE=<path> -f Dockerfile.jetson
#
ARG BASE_IMAGE=nvcr.io/nvidia/l4t-base:r32.4.3
FROM ${BASE_IMAGE} as onnxruntime
ARG WHEEL_FILE
RUN echo "Building ONNX Runtime Docker image with ${WHEEL_FILE}..."
# Ensure apt-get won't prompt for selecting options
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && \
apt install -y --no-install-recommends \
build-essential \
software-properties-common \
libopenblas-dev \
libpython3.6-dev \
python3-pip \
python3-dev \
cmake \
unattended-upgrades
RUN unattended-upgrade
RUN pip3 install --upgrade pip
RUN pip3 install setuptools
RUN pip3 install wheel pybind11 pytest
WORKDIR /onnxruntime
# copy previously built wheel into the container
COPY ${WHEEL_FILE} .
RUN basename ${WHEEL_FILE} | xargs pip3 install