Skip to content

Commit e3026a5

Browse files
committed
docker fix
1 parent ce5be69 commit e3026a5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from functools import lru_cache
66
from subprocess import DEVNULL, call
77

8+
import torch
89
from setuptools import setup
910
from torch.utils import cpp_extension
1011

@@ -14,7 +15,7 @@ def cuda_toolkit_available():
1415
# https://github.com/idiap/fast-transformers/blob/master/setup.py
1516
try:
1617
call(["nvcc"], stdout=DEVNULL, stderr=DEVNULL)
17-
return True
18+
return True and torch.cuda.is_available()
1819
except FileNotFoundError:
1920
return False
2021

0 commit comments

Comments
 (0)