-
Notifications
You must be signed in to change notification settings - Fork 5
/
install.js
74 lines (74 loc) · 1.79 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
module.exports = {
"run": [{
"method": "shell.run",
"params": {
"message": "git clone https://github.com/open-webui/open-webui app"
}
}, {
"method": "fs.copy",
"params": {
"src": "app/.env.example",
"dest": "app/.env"
}
}, {
"method": "shell.run",
"params": {
"conda": {
"path": "conda_env",
"python": "python=3.11"
},
"path": "app/backend",
"message": [
"conda install -y -c conda-forge nodejs=20.12.2",
]
}
}, {
"method": "local.set",
"params": {
"python_path": "{{platform === 'win32' ? 'app/backend/conda_env/python' : 'app/backend/conda_env/bin/python'}}",
"node_path": "{{platform === 'win32' ? 'app/backend/conda_env' : 'app/backend/conda_env/bin'}}",
}
}, {
"method": "shell.run",
"params": {
"path": "app/backend",
"message": [
"{{path.resolve(cwd, local.python_path) + ' --version'}}",
"{{path.resolve(cwd, local.python_path) + ' -m venv env'}}"
]
}
}, {
"method": "shell.run",
"params": {
"env": {
"NODE_OPTIONS": "--max_old_space_size=4096"
},
"conda": {
"path": "backend/conda_env",
},
"message": [
"{{path.resolve(cwd, local.node_path, 'node') + ' --version'}}",
"{{path.resolve(cwd, local.node_path, 'npm') + ' i'}}",
"{{path.resolve(cwd, local.node_path, 'npm') + ' run build'}}",
],
"path": "app"
}
}, {
"method": "shell.run",
"params": {
"conda": {
"path": "conda_env",
},
"message": [
"pip install -r requirements.txt"
],
"venv": "env",
"path": "app/backend"
}
// }, {
// "method": "fs.link",
// "params": {
// "venv": "app/backend/env"
// }
}]
}