File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 1- FROM runpod/pytorch:2.2 .0-py3.10-cuda12.1.1 -devel-ubuntu22.04
1+ FROM runpod/pytorch:2.1 .0-py3.10-cuda11.8.0 -devel-ubuntu22.04
22
33WORKDIR /
44
5- # The base image already includes CUDA 12.1 and cuDNN - no additional installs needed
5+ # Install system dependencies
6+ RUN apt-get update && apt-get install -y --no-install-recommends \
7+ wget \
8+ && rm -rf /var/lib/apt/lists/*
69
710# Install dependencies
811COPY requirements.txt .
@@ -11,7 +14,7 @@ RUN pip install --no-cache-dir -r requirements.txt
1114# Copy handler
1215COPY rp_handler.py .
1316
14- # cuDNN and CUDA libraries are already configured in the base image
17+ # Use CPU for now to test if build works at all
1518
1619# Start the handler
1720CMD python3 -u rp_handler.py
Original file line number Diff line number Diff line change @@ -66,16 +66,16 @@ def load_whisper_model():
6666 model_size = os .getenv ("WHISPER_MODEL" , "medium" )
6767 compute_type = os .getenv ("WHISPER_COMPUTE_TYPE" , "float16" )
6868
69- logger .info (f"π Loading faster-whisper model: { model_size } with { compute_type } precision on GPU " )
69+ logger .info (f"π Loading faster-whisper model: { model_size } with CPU for build testing " )
7070
71- # GPU-only for performance testing - cuDNN libraries should now be available via LD_LIBRARY_PATH
71+ # Try CPU first to test if build works at all
7272 whisper_model = WhisperModel (
7373 model_size ,
74- device = "cuda " ,
75- compute_type = compute_type ,
76- cpu_threads = 1
74+ device = "cpu " ,
75+ compute_type = "int8" ,
76+ cpu_threads = 4
7777 )
78- logger .info ("β
GPU model loaded successfully - REAL GPU PERFORMANCE! π " )
78+ logger .info ("β
CPU model loaded successfully - testing build " )
7979
8080 except Exception as e :
8181 logger .error (f"β Failed to load whisper model: { e } " )
@@ -184,7 +184,7 @@ def handler(job):
184184 "real_time_factor" : rtf ,
185185 "model" : os .getenv ("WHISPER_MODEL" , "medium" ),
186186 "compute_type" : os .getenv ("WHISPER_COMPUTE_TYPE" , "float16" ),
187- "device" : "cuda " ,
187+ "device" : "cpu " ,
188188 "speakers_detected" : len (set (seg ["speaker" ] for seg in cleaned_segments )),
189189 "segments_count" : len (cleaned_segments ),
190190 "serverless" : True
You canβt perform that action at this time.
0 commit comments