forked from majbyr/whisper_streaming
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (27 loc) · 867 Bytes
/
Dockerfile
File metadata and controls
39 lines (27 loc) · 867 Bytes
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
FROM nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
ENV WHISPER_LANGUAGE=et
# Install system dependencies
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
libsndfile1 \
portaudio19-dev \
python3-dev \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Install PyTorch with CUDA support
RUN pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
WORKDIR /app
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
COPY . .
RUN mkdir -p model
# Create a startup script (after COPY to overwrite local start.sh)
RUN echo '#!/bin/bash\n\
set -e\n\
exec uvicorn web_server:app --host 0.0.0.0 --port 8000\n' > /app/docker-start.sh && \
chmod +x /app/docker-start.sh
EXPOSE 8000
CMD ["/app/docker-start.sh"]