-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (44 loc) · 1.94 KB
/
Dockerfile
File metadata and controls
57 lines (44 loc) · 1.94 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
47
48
49
50
51
52
53
54
55
56
57
FROM ubuntu:noble
WORKDIR /home/main
#TODO: Change user to run in Open-Shift. Docker-compose volume model_cache will also need to change.
USER root
# Update and install required packages.
RUN apt update -y && \
apt install -y --no-install-recommends \
python3-full \
python3-dev \
python3-pip \
ffmpeg
#wget
# # Set Up Cuda Repos
# RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-ubuntu2404.pin
# RUN mv cuda-ubuntu2404.pin /etc/apt/preferences.d/cuda-repository-pin-600
# RUN wget https://developer.download.nvidia.com/compute/cuda/13.0.0/local_installers/cuda-repo-ubuntu2404-13-0-local_13.0.0-580.65.06-1_amd64.deb
# RUN dpkg -i cuda-repo-ubuntu2404-13-0-local_13.0.0-580.65.06-1_amd64.deb
# RUN cp /var/cuda-repo-ubuntu2404-13-0-local/cuda-*-keyring.gpg /usr/share/keyrings/
# # Install Cuda Repos
# RUN apt update -y && \
# apt install -y --no-install-recommends \
# cuda-toolkit-13-0 \
# nvidia-cuda-toolkit
# Install Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Allow PIP to install packages outside Python ENV
RUN python3 -m pip config set global.break-system-packages true
# Install python CUDA API
RUN pip install cuda-python==13.0.3
#* Installing the version of torch we want first to override the openai-whisper dependency version.
#* Avoids clean-up and keeps the container smaller.
# Install torch version for CUDA 13.0
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu130
# Or explicitly using:
# RUN pip install torch==2.9.1+cu130 torchvision==0.24.1+cu130 torchaudio==2.9.1+cu130 --index-url https://download.pytorch.org/whl/cu130
# Install Whisper (20250625) and Rust tools (1.12.0).
RUN pip install -U openai-whisper
RUN pip install setuptools-rust
# Clean Up caches
RUN pip cache purge
RUN apt clean && rm -rf /var/lib/apt/lists/*
# Copy main folder into container.
COPY ./main .
RUN chmod -R ug+w /home/main