forked from zackees/transcribe-anything
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (27 loc) · 1.23 KB
/
Dockerfile
File metadata and controls
36 lines (27 loc) · 1.23 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
# GPU-accelerated transcribe-anything Docker image
# Uses PyTorch CUDA 12.6 runtime for optimal GPU performance
FROM pytorch/pytorch:2.6.0-cuda12.6-cudnn9-runtime
# Prevent Python from writing bytecode and enable unbuffered output
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /app
# Install system dependencies
RUN apt-get update -y
RUN apt-get install -y build-essential curl dos2unix
# Configure NVIDIA Docker runtime for GPU access
RUN distribution=$(. /etc/os-release;echo $ID$VERSION_ID) && \
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | apt-key add - && \
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | tee /etc/apt/sources.list.d/nvidia-docker.list
RUN apt-get update -y
RUN apt-get install -y nvidia-container-toolkit
RUN mkdir -p /etc/docker
RUN nvidia-ctk runtime configure --runtime=docker
# Copy source code and prepare entrypoint
COPY . .
RUN chmod +x entrypoint.sh && dos2unix entrypoint.sh
# Install transcribe-anything in editable mode
RUN pip install -e .
# Pre-initialize GPU dependencies to reduce startup time
RUN /bin/bash /app/entrypoint.sh --only-check-shared-libs && transcribe-anything-init-insane
ENTRYPOINT ["/app/entrypoint.sh"]
CMD ["--help"]