-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall.js
48 lines (48 loc) · 2.01 KB
/
install.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
module.exports = {
"cmds": {
"win32": {
"nvidia": "uv pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 xformers --index-url https://download.pytorch.org/whl/cu121",
"amd": "uv pip install torch-directml torchvision torchaudio numpy==1.26.4",
"cpu": "uv pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cpu"
},
"darwin": "uv pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cpu",
"linux": {
"nvidia": "uv pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 xformers --index-url https://download.pytorch.org/whl/cu121",
"amd": "uv pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/rocm5.7",
"cpu": "uv pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cpu"
}
},
"run": [{
"method": "shell.run",
"params": {
"message": "git clone https://huggingface.co/spaces/cocktailpeanut/LGM app"
}
}, {
"method": "shell.run",
"params": {
"conda": "env",
"path": "app",
"message": [
"{{platform === 'win32' ? 'where pip' : 'which pip'}}",
"{{(platform === 'darwin' ? self.cmds.darwin : (['nvidia', 'amd'].includes(gpu) ? self.cmds[platform][gpu] : self.cmds[platform].cpu))}}",
"{{platform === 'win32' ? 'where pip' : 'which pip'}}",
"uv pip install opencv-python",
"{{platform === 'win32' ? 'where pip' : 'which pip'}}",
"uv pip install -r requirements.txt",
"{{platform === 'win32' ? 'where pip' : 'which pip'}}",
"conda install -y cudnn libzlib-wapi -c conda-forge",
"conda install -y cuda -c nvidia/label/cuda-12.1.0"
]
}
// }, {
// "method": "fs.share",
// "params": {
// "venv": "app/env"
// }
}, {
"method": "notify",
"params": {
"html": "Click the 'start' tab to get started!"
}
}]
}