Previous class
SSL Flush and Re-Issue New SSL

Re-Configure the AI Instance

If you did a rsync change the root password

sudo passwd root

cd to the working directory.

cd /var/www/html/BlogEngine_v5

edit the .env file ENDPOINT with the new domain

nano .env 

Run UVICORN and check for dependencies / errors

uvicorn engine:app --host 0.0.0.0 --port 8502 --reload

If you get an error about tensorflow - install it

pip install tensorflow

Run Streamlit in working directory to test.

streamlit run home.py --server.port 5173

Now let's re-configure the services

cd /etc/systemd/system

rename the service using cp command

cp name.client.service newname.client.service
cp name.server.service newname.server.service

Edit the new client service file: Change the Description and User

nano newname.client.service

Edit the new server service file: Change the Description and User

nano newname.server.service 

Edit the Streamlit.conf file in /etc/stunnel - Change the Name in the Top and the user in both SSL's

nano /etc/stunnel/streamlit.conf 

Create new User matching what you have in the Service files.

sudo adduser newuser

Now cd back to the working directory and let's change file permissions.

sudo chown -R newuser:newuser .

Change the permissions of engine.py, .env, home.py, images, prompts, .streamlit, and style to rwxrwxrwx (777):

sudo chmod 777 engine.py .env home.py 
sudo chmod -R 777 images prompts .streamlit style
  • Mark as Completed
  • More
Next class
Git Clone Private Repo
Comments (0)
Login or Join to comment.

IMREAL.LIFE

Close