Spaces:
Paused
Paused
| module.exports = { | |
| run: [ | |
| // windows nvidia | |
| { | |
| "when": "{{platform === 'win32' && gpu === 'nvidia'}}", | |
| "method": "shell.run", | |
| "params": { | |
| "venv": "{{args && args.venv ? args.venv : null}}", | |
| "path": "{{args && args.path ? args.path : '.'}}", | |
| "message": "uv pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 --force-reinstall" | |
| } | |
| }, | |
| // windows amd | |
| { | |
| "when": "{{platform === 'win32' && gpu === 'amd'}}", | |
| "method": "shell.run", | |
| "params": { | |
| "venv": "{{args && args.venv ? args.venv : null}}", | |
| "path": "{{args && args.path ? args.path : '.'}}", | |
| "message": "uv pip install torch-directml torchaudio torchvision" | |
| } | |
| }, | |
| // windows cpu | |
| { | |
| "when": "{{platform === 'win32' && (gpu !== 'nvidia' && gpu !== 'amd')}}", | |
| "method": "shell.run", | |
| "params": { | |
| "venv": "{{args && args.venv ? args.venv : null}}", | |
| "path": "{{args && args.path ? args.path : '.'}}", | |
| "message": "uv pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu --force-reinstall" | |
| } | |
| }, | |
| // mac | |
| { | |
| "when": "{{platform === 'darwin'}}", | |
| "method": "shell.run", | |
| "params": { | |
| "venv": "{{args && args.venv ? args.venv : null}}", | |
| "path": "{{args && args.path ? args.path : '.'}}", | |
| "message": "uv pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu --force-reinstall" | |
| } | |
| }, | |
| // linux nvidia | |
| { | |
| "when": "{{platform === 'linux' && gpu === 'nvidia'}}", | |
| "method": "shell.run", | |
| "params": { | |
| "venv": "{{args && args.venv ? args.venv : null}}", | |
| "path": "{{args && args.path ? args.path : '.'}}", | |
| "message": "uv pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 --force-reinstall" | |
| } | |
| }, | |
| // linux rocm (amd) | |
| { | |
| "when": "{{platform === 'linux' && gpu === 'amd'}}", | |
| "method": "shell.run", | |
| "params": { | |
| "venv": "{{args && args.venv ? args.venv : null}}", | |
| "path": "{{args && args.path ? args.path : '.'}}", | |
| "message": "uv pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.1 --force-reinstall" | |
| } | |
| }, | |
| // linux cpu | |
| { | |
| "when": "{{platform === 'linux' && (gpu !== 'amd' && gpu !=='nvidia')}}", | |
| "method": "shell.run", | |
| "params": { | |
| "venv": "{{args && args.venv ? args.venv : null}}", | |
| "path": "{{args && args.path ? args.path : '.'}}", | |
| "message": "uv pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu --force-reinstall" | |
| } | |
| } | |
| ] | |
| } | |