-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
46 lines (37 loc) · 1.34 KB
/
Copy pathDockerfile
File metadata and controls
46 lines (37 loc) · 1.34 KB
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
FROM python:3.11-slim
# Install system dependencies
RUN echo "📦 Installing system dependencies..." && \
apt-get update && apt-get install -y \
ffmpeg \
git \
build-essential \
cmake \
wget \
curl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python dependencies
COPY backend/requirements.txt .
RUN echo "🐍 Installing Python dependencies..." && \
pip3 install --no-cache-dir -r requirements.txt && \
pip3 install --upgrade --no-cache-dir yt-dlp
# Clone and build whisper.cpp
RUN echo "🎙️ Cloning whisper.cpp..." && \
git clone https://github.com/ggerganov/whisper.cpp /app/whisper.cpp && \
echo "🔨 Building whisper.cpp (this may take a few minutes)..." && \
cd /app/whisper.cpp && \
cmake -B build && \
cmake --build build --config Release && \
echo "✅ Whisper.cpp built successfully!"
# Download Whisper tiny model (3-5x faster than base, good for shorts)
RUN echo "📥 Downloading Whisper tiny model (faster processing)..." && \
cd /app/whisper.cpp && \
bash ./models/download-ggml-model.sh tiny && \
echo "✅ Model downloaded successfully!"
# Copy backend code
COPY backend/ .
# Create work directory for processing
RUN mkdir -p /app/work
EXPOSE 8000
CMD echo "🚀 Starting VIND backend..." && \
uvicorn api.main:app --host 0.0.0.0 --port 8000 --reload