Skip to content

Commit cfca667

Browse files
authored
Merge pull request #295 from nbrew/feature/update-dockerfile-to-cuda12.8.1-cudnn-torch2.7.1
Update dockerfile and local requirements to cuda12.8.1 cudnn torch2.7.1
2 parents e211516 + 13d59e8 commit cfca667

6 files changed

Lines changed: 20 additions & 14 deletions

File tree

Dockerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
FROM nvidia/cuda:12.4.1-runtime-ubuntu22.04 as gpu
1+
FROM nvidia/cuda:12.8.1-cudnn-runtime-ubuntu24.04 as gpu
22

33
WORKDIR /app
44

55
RUN apt-get update -y && \
6-
apt-get install -y python3 python3-pip libcudnn8 libcudnn8-dev libcublas-12-4 portaudio19-dev
6+
apt-get install -y python3 python3-pip portaudio19-dev
77

8-
RUN pip3 install torch==2.3.0 torchaudio==2.3.0
8+
RUN pip3 install torch==2.7.1+cu128 torchaudio==2.7.1+cu128 --index-url https://download.pytorch.org/whl/cu128
99

10-
COPY requirements-gpu.txt /app/requirements-gpu.txt
11-
RUN pip3 install -r /app/requirements-gpu.txt
10+
COPY requirements-gpu* /app/
11+
RUN pip3 install -r /app/requirements-gpu-torch.txt && \
12+
pip3 install -r /app/requirements-gpu.txt
1213

1314
RUN mkdir example_browserclient
1415
COPY example_browserclient/server.py /app/example_browserclient/server.py
@@ -21,14 +22,14 @@ CMD ["python3", "example_browserclient/server.py"]
2122

2223
# --------------------------------------------
2324

24-
FROM ubuntu:22.04 as cpu
25+
FROM ubuntu:24.04 as cpu
2526

2627
WORKDIR /app
2728

2829
RUN apt-get update -y && \
2930
apt-get install -y python3 python3-pip portaudio19-dev
3031

31-
RUN pip3 install torch==2.3.0 torchaudio==2.3.0
32+
RUN pip3 install torch==2.7.1 torchaudio==2.7.1
3233

3334
COPY requirements.txt /app/requirements.txt
3435
RUN pip3 install -r /app/requirements.txt

example_browserclient/client.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
let socket = new WebSocket("ws://localhost:8001");
1+
let socket = new WebSocket("ws://localhost:9001");
22
let displayDiv = document.getElementById('textDisplay');
33
let server_available = false;
44
let mic_available = false;
@@ -7,7 +7,7 @@ let fullSentences = [];
77
const serverCheckInterval = 5000; // Check every 5 seconds
88

99
function connectToServer() {
10-
socket = new WebSocket("ws://localhost:8001");
10+
socket = new WebSocket("ws://localhost:9001");
1111

1212
socket.onopen = function(event) {
1313
server_available = true;

example_browserclient/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ async def main():
135135
recorder_ready.wait()
136136

137137
print("Server started. Press Ctrl+C to stop the server.")
138-
async with websockets.serve(echo, "localhost", 8001):
138+
async with websockets.serve(echo, "localhost", 9001):
139139
try:
140140
await asyncio.Future() # run forever
141141
except asyncio.CancelledError:

install_with_gpu_support.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pip install torch==2.1.2+cu118 torchaudio==2.1.2+cu118 --index-url https://download.pytorch.org/whl/cu118
1+
pip install -r requirements-gpu-torch.txt
22
pip install -r requirements-gpu.txt

requirements-gpu-torch.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--index-url https://download.pytorch.org/whl/cu128
2+
torch==2.7.1+cu128
3+
torchaudio==2.7.1+cu128

requirements-gpu.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
PyAudio==0.2.14
2-
faster-whisper==1.1.0
2+
faster-whisper==1.1.1
33
pvporcupine==1.9.5
44
webrtcvad-wheels==2.0.14
55
halo==0.0.31
6-
scipy==1.14.1
6+
scipy==1.15.2
77
websockets==14.1
88
websocket-client==1.8.0
99
openwakeword>=0.4.0
10-
numpy<2.0.0
10+
numpy<2.0.0
11+
soundfile==0.13.1
12+
# torch and torchaudio requirements are in requirements-torch-gpu.txt

0 commit comments

Comments
 (0)