forked from dusty-nv/jetson-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
51 lines (41 loc) · 1.85 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#---
# name: whisper
# group: audio
# depends: [numba, numpy, pytorch, torchaudio, jupyterlab]
# requires: '>=34.1.0'
# docs: docs.md
#---
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
WORKDIR /opt
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ffmpeg \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
RUN pip3 install pandas scipy jiwer ipywebrtc
RUN python3 -c 'import torch; print(f"PyTorch version: {torch.__version__}"); print(f"CUDA available: {torch.cuda.is_available()}"); print(f"cuDNN version: {torch.backends.cudnn.version()}"); print(f"torch.distributed: {torch.distributed.is_available()}"); print(torch.__config__.show());'
# Clone the repository:
RUN git clone https://github.com/openai/whisper/ && \
cd whisper && \
sed 's|^numba.*||' -i requirements.txt && \
sed 's|^numpy.*||' -i requirements.txt && \
sed 's|^torch.*||' -i requirements.txt && \
cat requirements.txt && \
pip3 install .
RUN python3 -c 'import torch; print(f"PyTorch version: {torch.__version__}"); print(f"CUDA available: {torch.cuda.is_available()}"); print(f"cuDNN version: {torch.backends.cudnn.version()}"); print(f"torch.distributed: {torch.distributed.is_available()}"); print(torch.__config__.show());'
WORKDIR /opt/whisper/
COPY record-and-transcribe.ipynb /opt/whisper/notebooks
RUN openssl req \
-new \
-newkey rsa:4096 \
-days 365 \
-nodes \
-x509 \
-keyout mykey.key \
-out mycert.pem \
-subj '/CN=localhost'
CMD /bin/bash -c "jupyter lab --ip 0.0.0.0 --port 8888 --certfile=mycert.pem --keyfile mykey.key --allow-root &> /var/log/jupyter.log" & \
echo "allow 10 sec for JupyterLab to start @ https://$(hostname -I | cut -d' ' -f1):8888 (password nvidia)" && \
echo "JupterLab logging location: /var/log/jupyter.log (inside the container)" && \
/bin/bash