forked from dusty-nv/jetson-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
19 lines (16 loc) · 786 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#---
# name: optimum
# group: llm
# config: config.py
# depends: [onnxruntime, transformers]
# test: test.py
# notes: https://github.com/huggingface/optimum
#---
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
RUN pip3 install --no-cache-dir --verbose optimum[exporters,onnxruntime]
RUN pip3 uninstall -y onnxruntime onnxruntime-gpu && \
pip3 install --no-cache-dir --verbose /opt/onnxruntime_gpu-*.whl
# ImportError: `onnxruntime-gpu` is installed, but GPU dependencies are not loaded.
RUN PYTHON_DIST_PACKAGES=$(python3 -c 'import sys; print(f"/usr/local/lib/python{sys.version_info.major}.{sys.version_info.minor}/dist-packages")') && \
sed -i 's/if "ORT_CUDA" not in file_string or "ORT_TENSORRT" not in file_string:/if False:/g' $PYTHON_DIST_PACKAGES/optimum/onnxruntime/utils.py