Skip to content

Commit 92bb404

Browse files
authored
Merge pull request #2 from thecooltechguy/main
Fixed install.py script
2 parents 7cb170d + 0e781a2 commit 92bb404

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

install.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
import subprocess
33

44
from pathlib import Path
5+
from typing import List
56

67
PARENT_DIR = Path(__file__).parent
78

89

9-
def pip_install(package: str) -> None:
10+
def pip_install(args: List[str]) -> None:
1011
subprocess.check_call(
11-
[sys.executable, "-m", "pip", "install", package], cwd=PARENT_DIR
12+
[sys.executable, "-m", "pip", "install", ] + args, cwd=PARENT_DIR
1213
)
1314

1415

@@ -25,12 +26,12 @@ def main() -> None:
2526
cuda_version = try_get_cuda_version()
2627
if cuda_version is not None:
2728
if cuda_version.startswith("12."):
28-
pip_install("-e .[cuda-12]")
29+
pip_install(["-e", ".[cuda-12]"])
2930
else:
30-
pip_install("-e .[cuda]")
31+
pip_install(["-e", ".[cuda]"])
3132
else:
3233
# Default install
33-
pip_install("-e .[cpu]")
34+
pip_install(["-e", ".[cpu]"])
3435

3536

3637
if __name__ == "__main__":

0 commit comments

Comments
 (0)