Skip to content

Commit

Permalink
updates deps for github runner
Browse files Browse the repository at this point in the history
  • Loading branch information
zackees committed Jan 12, 2024
1 parent c5ce391 commit ce46037
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion transcribe_anything/cuda_available.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This is meant to be run under a "isolated-environment".
"""


import shutil
import sys
from dataclasses import dataclass, asdict, fields
import json
Expand Down Expand Up @@ -66,6 +66,8 @@ def cuda_cards_available() -> CudaInfo:
ordered by VRAM and multiprocessors.
"""
# Have to import here, since others will import CudaDevice and CudaInfo.
if shutil.which('nvidia-smi') is None:
return CudaInfo(False, 0, [])
import torch # pylint: disable=import-outside-toplevel
if torch.cuda.is_available():
devices = [
Expand Down

0 comments on commit ce46037

Please sign in to comment.