forked from dusty-nv/jetson-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.python
36 lines (31 loc) · 1.27 KB
/
Dockerfile.python
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
#---
# name: riva-client:python
# group: audio
# depends: [python]
# requires: '>=34.1.0'
# test: [test.py]
# docs: docs.md
# notes: https://github.com/nvidia-riva/python-clients
#---
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
# install prerequisites
RUN apt-get update && \
apt-get install -y --no-install-recommends \
portaudio*-dev \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean && \
\
# install pyaudio from pip instead of apt (python3-pyaudio)
# https://bugs.launchpad.net/ubuntu/+source/python-pyaudio/+bug/1970912
pip3 install --upgrade --no-cache-dir --verbose pyaudio
# Riva Python client
ADD https://api.github.com/repos/nvidia-riva/python-clients/git/refs/heads/main /tmp/riva_python_version.json
RUN git clone --depth=1 --recursive https://github.com/nvidia-riva/python-clients /opt/riva/python-clients && \
cd /opt/riva/python-clients && \
pip3 install --no-cache-dir --verbose -r requirements.txt && \
python3 setup.py --verbose bdist_wheel && \
cp dist/nvidia_riva_client*.whl /opt
RUN pip3 install --no-cache-dir --verbose /opt/nvidia_riva_client*.whl && \
pip3 show nvidia-riva-client && python3 -c 'import riva.client; print(riva.client.__version__)'
COPY list_audio_devices.py loopback.py /opt/riva/python-clients/scripts/