mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-01-15 18:38:38 +01:00
d2ee117a0a
* build: add dockerfile for ci * ci: add action to build/push docker image * fix: lowercase repository to fix ci * ci: update cuBLAS flag * build: install curl and ffmped in image * docs: add docker section * fix: improve args check when download model
35 lines
965 B
Docker
35 lines
965 B
Docker
ARG UBUNTU_VERSION=22.04
|
|
# This needs to generally match the container host's environment.
|
|
ARG CUDA_VERSION=12.3.1
|
|
# Target the CUDA build image
|
|
ARG BASE_CUDA_DEV_CONTAINER=nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION}
|
|
# Target the CUDA runtime image
|
|
ARG BASE_CUDA_RUN_CONTAINER=nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}
|
|
|
|
FROM ${BASE_CUDA_DEV_CONTAINER} AS build
|
|
WORKDIR /app
|
|
|
|
# Unless otherwise specified, we make a fat build.
|
|
ARG CUDA_DOCKER_ARCH=all
|
|
# Set nvcc architecture
|
|
ENV CUDA_DOCKER_ARCH=${CUDA_DOCKER_ARCH}
|
|
# Enable cuBLAS
|
|
ENV WHISPER_CUBLAS=1
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y build-essential \
|
|
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
|
|
|
|
COPY .. .
|
|
RUN make
|
|
|
|
FROM ${BASE_CUDA_RUN_CONTAINER} AS runtime
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y curl ffmpeg \
|
|
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
|
|
|
|
COPY --from=build /app /app
|
|
ENTRYPOINT [ "bash", "-c" ]
|