Skip to content

Commit

Permalink
fix(docker): update docker for wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
rishikanthc committed Oct 19, 2024
1 parent 5bb695e commit d3545ac
Showing 1 changed file with 13 additions and 28 deletions.
41 changes: 13 additions & 28 deletions Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
ARG ARCH=
FROM ${ARCH}python:3.10-slim AS build_ml

WORKDIR /app

RUN apt-get update && \
apt-get install -y build-essential \
ca-certificates \
ffmpeg \
libsndfile1 \
git && \
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*

RUN git clone https://github.com/ggerganov/whisper.cpp.git
WORKDIR /app/whisper.cpp

# Build Whisper.cpp
RUN make

RUN pip install --prefix=/install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
RUN pip install --prefix=/install --no-cache-dir pyannote.audio

ARG ARCH=
FROM ${ARCH}python:3.10-slim
ENV DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -63,6 +41,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libboost-program-options-dev \
libboost-regex-dev \
curl \
git \
pkg-config \
libsndfile1 \
&& rm -rf /var/lib/apt/lists/*
Expand All @@ -87,18 +66,24 @@ RUN ARCH="$(dpkg --print-architecture)" && \

RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && apt-get install -y nodejs

COPY --from=build_ml /app/whisper.cpp/main /usr/local/bin/whisper
COPY --from=build_ml /app/whisper.cpp/models/download-ggml-model.sh /usr/local/bin/download-ggml-model.sh
# COPY --from=build_ml /app/whisper.cpp/main /usr/local/bin/whisper
# COPY --from=build_ml /app/whisper.cpp/models/download-ggml-model.sh /usr/local/bin/download-ggml-model.sh

# WORKDIR /models
# RUN download-ggml-model.sh base.en /models && \
# download-ggml-model.sh tiny.en /models && \
# download-ggml-model.sh small.en /models

RUN pip install --prefix=/install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
RUN pip install --prefix=/install --no-cache-dir pyannote.audio

WORKDIR /models
RUN download-ggml-model.sh base.en /models && \
download-ggml-model.sh tiny.en /models && \
download-ggml-model.sh small.en /models

WORKDIR /app

COPY . .

RUN git clone https://github.com/ggerganov/whisper.cpp.git

RUN npm ci

# Expose necessary ports
Expand Down

0 comments on commit d3545ac

Please sign in to comment.