Skip to content

Commit 1a86fdc

Browse files
committed
Enables use PT nightlies on CPU
1 parent 995fcf8 commit 1a86fdc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ts_scripts/install_dependencies.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,12 @@ def install_python_packages(self, cuda_version, requirements_file_path, nightly)
124124

125125
# Install PyTorch packages
126126
if nightly:
127+
if cuda_version:
128+
pt_nightly = cuda_version
129+
else:
130+
pt_nightly = "cpu"
127131
os.system(
128-
f"pip3 install numpy --pre torch torchvision torchtext torchaudio --force-reinstall --extra-index-url https://download.pytorch.org/whl/nightly/{cuda_version}"
132+
f"pip3 install numpy --pre torch torchvision torchtext torchaudio --force-reinstall --extra-index-url https://download.pytorch.org/whl/nightly/{pt_nightly}"
129133
)
130134
else:
131135
self.install_torch_packages(cuda_version)

0 commit comments

Comments
 (0)