forked from dusty-nv/jetson-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (25 loc) · 1.01 KB
/
Dockerfile
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
#---
# name: onnx
# group: ml
# config: config.py
# depends: [cmake, python, numpy]
# test: test.py
# notes: the `protobuf_apt` is added as a dependency on JetPack 4 (newer versions of onnx build it in-tree)
#---
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
ARG ONNX_VERSION
RUN pip3 install --no-cache-dir --verbose onnx || \
pip3 install --no-cache-dir --verbose git+https://github.com/onnx/onnx@${ONNX_VERSION} && \
pip3 show onnx && \
python3 -c 'import onnx; print(onnx.__version__)'
# error introduced by https://github.com/onnx/onnx/pull/5777 results in python protobuf mismatch
# https://github.com/onnx/onnx/blob/6ff456c1179c34827ad910e5601cb1486822d800/CMakeLists.txt#L249
#RUN set -ex \
# && if [ `lsb_release --codename --short` != 'bionic' ]; then \
# pip3 install --no-cache-dir --verbose protobuf==4.22.3; \
# fi \
# \
# && pip3 install --no-cache-dir --verbose git+https://github.com/onnx/onnx@${ONNX_VERSION} \
# && pip3 show onnx \
# && python3 -c 'import onnx; print(onnx.__version__)'