Skip to content

Commit 51c5689

Browse files
committed
Fallback to CPU to test build
1 parent e833c50 commit 51c5689

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

β€ŽDockerfileβ€Ž

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
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

33
WORKDIR /
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
811
COPY requirements.txt .
@@ -11,7 +14,7 @@ RUN pip install --no-cache-dir -r requirements.txt
1114
# Copy handler
1215
COPY 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
1720
CMD python3 -u rp_handler.py

β€Žrp_handler.pyβ€Ž

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
Β (0)