abenkbp commited on
Commit
7c2b1a6
·
1 Parent(s): 13cdc85
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -11,10 +11,10 @@ if not os.path.exists("/home/user/.flag"):
11
  subprocess.Popen("curl -o- file:///home/user/app/data/config_nginx.sh | bash", shell=True, executable='/bin/bash').wait()
12
  subprocess.Popen("curl -o- file:///home/user/app/data/setup.sh | bash", shell=True, executable='/bin/bash').wait()
13
  subprocess.Popen("source /home/user/.bashrc && source /home/user/.nvm/nvm.sh && nvm install --lts && npm update -g npm", shell=True, executable='/bin/bash').wait()
14
- subprocess.Popen("source /home/user/.bashrc && npm install n8n@latest -g", shell=True, executable='/bin/bash').wait()
15
- subprocess.Popen("source /home/user/.bashrc && npm install pm2@latest -g", shell=True, executable='/bin/bash').wait()
16
  node_version_dir = subprocess.check_output("ls ~/.nvm/versions/node", shell=True, executable='/bin/bash').strip().decode('utf-8')
17
  node_path = f"/home/user/.nvm/versions/node/{node_version_dir}/bin/"
 
 
18
  subprocess.Popen(["pm2", "start", f"{node_path}n8n"]).wait()
19
  subprocess.Popen(["pm2", "start", "/home/user/app/data/models/llama3-1-8b.py","--interpreter=python3"]).wait()
20
  subprocess.Popen(["pm2", "start", "/home/user/app/data/models/llama3-1-70b.py","--interpreter=python3"]).wait()
 
11
  subprocess.Popen("curl -o- file:///home/user/app/data/config_nginx.sh | bash", shell=True, executable='/bin/bash').wait()
12
  subprocess.Popen("curl -o- file:///home/user/app/data/setup.sh | bash", shell=True, executable='/bin/bash').wait()
13
  subprocess.Popen("source /home/user/.bashrc && source /home/user/.nvm/nvm.sh && nvm install --lts && npm update -g npm", shell=True, executable='/bin/bash').wait()
 
 
14
  node_version_dir = subprocess.check_output("ls ~/.nvm/versions/node", shell=True, executable='/bin/bash').strip().decode('utf-8')
15
  node_path = f"/home/user/.nvm/versions/node/{node_version_dir}/bin/"
16
+ subprocess.Popen(f"{node_path}npm install n8n@latest -g", shell=True, executable='/bin/bash').wait()
17
+ subprocess.Popen(f"{node_path}npm install pm2@latest -g", shell=True, executable='/bin/bash').wait()
18
  subprocess.Popen(["pm2", "start", f"{node_path}n8n"]).wait()
19
  subprocess.Popen(["pm2", "start", "/home/user/app/data/models/llama3-1-8b.py","--interpreter=python3"]).wait()
20
  subprocess.Popen(["pm2", "start", "/home/user/app/data/models/llama3-1-70b.py","--interpreter=python3"]).wait()