RaeesRSB commited on
Commit
e93f481
1 Parent(s): 2cba4ca

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +35 -0
Dockerfile ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ RUN apt-get update && \
4
+ apt-get install -y --no-install-recommends \
5
+ ffmpeg
6
+
7
+ RUN python3 -m pip install --upgrade pip
8
+
9
+ # Python installation
10
+ WORKDIR /usr/src/app
11
+
12
+ # Force CPU versions of torch
13
+ RUN pip3 install \
14
+ torch==1.13.1+cpu \
15
+ torchaudio==0.13.1+cpu \
16
+ -f https://download.pytorch.org/whl/torch_stable.html
17
+
18
+ # Note: First installing the python requirements permits to save time when re-building after a source change.
19
+ COPY requirements.txt /usr/src/app/requirements.txt
20
+ RUN cd /usr/src/app/ && pip3 install -r requirements.txt
21
+
22
+ # Copy source
23
+ COPY setup.py /usr/src/app/setup.py
24
+ COPY whisper_timestamped /usr/src/app/whisper_timestamped
25
+
26
+ # Install
27
+ RUN cd /usr/src/app/ && pip3 install ".[dev]"
28
+
29
+ # Cleanup
30
+ RUN rm -R /usr/src/app/requirements.txt /usr/src/app/setup.py /usr/src/app/whisper_timestamped
31
+
32
+ # Copy tests
33
+ COPY tests /usr/src/app/tests
34
+
35
+ ENTRYPOINT ["/bin/bash"]