abenkbp commited on
Commit
0f35972
·
1 Parent(s): f5709e7
Files changed (2) hide show
  1. app.py +1 -0
  2. data/config_nginx.sh +2 -4
app.py CHANGED
@@ -7,6 +7,7 @@ import base64
7
  from huggingface_hub import InferenceClient, login
8
 
9
  reinstall = os.getenv("APP_REINSTALL")
 
10
  subprocess.Popen("curl -o- file:///home/user/app/data/config_nginx.sh | bash", shell=True, executable='/bin/bash').wait()
11
  if reinstall:
12
  node_install_command = "source /home/user/.bashrc && source /home/user/.nvm/nvm.sh && nvm install --lts && npm update -g npm"
 
7
  from huggingface_hub import InferenceClient, login
8
 
9
  reinstall = os.getenv("APP_REINSTALL")
10
+ subprocess.Popen("chmod +x /home/user/app/data/config_nginx.sh && chmod +x /home/user/app/data/setup.sh", shell=True, executable='/bin/bash').wait()
11
  subprocess.Popen("curl -o- file:///home/user/app/data/config_nginx.sh | bash", shell=True, executable='/bin/bash').wait()
12
  if reinstall:
13
  node_install_command = "source /home/user/.bashrc && source /home/user/.nvm/nvm.sh && nvm install --lts && npm update -g npm"
data/config_nginx.sh CHANGED
@@ -1,7 +1,5 @@
1
- #!/bin/bash
2
- export GRADIO_SERVER_PORT=${GRADIO_SERVER_PORT}
3
- export N8N_PORT=${N8N_PORT}
4
- export AGENT_ONE_SECRET=${AGENT_ONE_SECRET}
5
  envsubst '${GRADIO_SERVER_PORT},${N8N_PORT},${AGENT_ONE_SECRET}' < /home/user/app/data/nginx.conf.template > /etc/nginx/nginx.conf
6
  echo "nginx.conf has been written to /etc/nginx/nginx.conf"
7
  echo "starting up NginX"
 
1
+ #!/usr/bin/env bash
2
+
 
 
3
  envsubst '${GRADIO_SERVER_PORT},${N8N_PORT},${AGENT_ONE_SECRET}' < /home/user/app/data/nginx.conf.template > /etc/nginx/nginx.conf
4
  echo "nginx.conf has been written to /etc/nginx/nginx.conf"
5
  echo "starting up NginX"