{"id":10607,"date":"2025-11-14T08:47:57","date_gmt":"2025-11-14T13:47:57","guid":{"rendered":"https:\/\/stevepedwards.today\/DebianAdmin\/?page_id=10607"},"modified":"2026-05-25T14:06:26","modified_gmt":"2026-05-25T19:06:26","slug":"start-llm-services","status":"publish","type":"page","link":"https:\/\/stevepedwards.today\/DebianAdmin\/start-llm-services\/","title":{"rendered":"Start LLM Services"},"content":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_10607\" class=\"pvc_stats all  \" data-element-id=\"10607\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p><span style=\"color: #000000;\">cd \/var\/www\/my-llm-project\/ ; source llm_venv\/bin\/activate ;<\/span><\/p>\n<p>after running<br \/>\npython update_agent.py<br \/>\nstop Flask with CtrlC and run background:<\/p>\n<p>Using Scrren for BG server:<\/p>\n<p>Option 1: Use screen (The Recommended Approach)<\/p>\n<p>[Because<\/p>\n<p>nohup python semantic_search_api.py &gt; flask_service.log 2&gt;&amp;1 &amp;<\/p>\n<p>fails since the repairs??? }<\/p>\n<p>Screen creates a full, physical terminal session inside the Linux kernel. When you disconnect from SSH, the virtual terminal stays exactly as it is, running in the background.<\/p>\n<p>1. Install screen:<\/p>\n<p>Bash<br \/>\nsudo apt update &amp;&amp; sudo apt install screen -y<br \/>\n2. Start a new named screen session:<\/p>\n<p>Bash<br \/>\nscreen -S flask-search<br \/>\n(Your terminal will clear\u2014you are now inside a detached-ready terminal container).<\/p>\n<p>3. Activate your environment and start the API in the foreground:<\/p>\n<p>Bash<br \/>\nsource llm_venv\/bin\/activate<br \/>\npython semantic_search_api.py<br \/>\nLet it run normally. Verify that your website search button works and the green terminal box connects successfully.<\/p>\n<p>4. Detach from the session:<br \/>\nPress Ctrl + A, then press D.<\/p>\n<p>You will drop back to your normal terminal, with a message saying [detached from ...]. You can now safely type exit and close your SSH connection. The script will keep running exactly as if you were still watching it.<\/p>\n<p>To go back and check on it later: SSH back into your box and run: screen -r flask-search<\/p>\n<p>To detach again: Ctrl + A, then D.<\/p>\n<p>COPY ISP files to local WSL2 terminal:<br \/>\nscp -r stevee@stevepedwards.today:\/var\/www\/filename .<br \/>\nscp -r stevee@stevepedwards.today:\/var\/www\/*.zip \/mnt\/c\/MyData\/www\/<br \/>\n*.sql<br \/>\n*.txt<br \/>\n*.html<br \/>\n*.png<br \/>\n*.ico<br \/>\n*.php *<br \/>\n.bash<\/p>\n<p>Check main page for Flask running<\/p>\n<p>Backup DebianAdmin dir from \/var\/www\/:<br \/>\ncd \/var\/www\/<br \/>\nsudo mysqldump -vu root -p ES &gt; \/var\/www\/ESMay26.sql<br \/>\nsudo mysqldump -vu root -p DA &gt; \/var\/www\/DAMay26.sql<br \/>\nzip ElectronicsStuff.zip ElectronicsStuff -r<br \/>\nzip DebianAdmin.zip DebianAdmin -r<br \/>\nzip Apache2.zip \/etc\/apache2\/ -r<br \/>\nzip my-llm-project.zip my-llm-project -r<\/p>\n<p>Mount the win USB drives for copying ISP downloads:<br \/>\nsudo mkdir \/mnt\/d<br \/>\nsudo mount -t drvfs D: \/mnt\/d<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_10607\" class=\"pvc_stats all  \" data-element-id=\"10607\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p>cd \/var\/www\/my-llm-project\/ ; source llm_venv\/bin\/activate ; after running python update_agent.py stop Flask with CtrlC and run background: Using Scrren for BG server: Option 1: Use screen (The Recommended Approach) [Because nohup python semantic_search_api.py &gt; flask_service.log 2&gt;&amp;1 &amp; fails since the repairs??? } Screen creates a full, physical terminal session inside the Linux kernel. When you <a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/start-llm-services\/\" class=\"more-link\">...<span class=\"screen-reader-text\">\u00a0 Start LLM Services<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-10607","page","type-page","status-publish","hentry"],"a3_pvc":{"activated":true,"total_views":5,"today_views":0},"_links":{"self":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/pages\/10607","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/comments?post=10607"}],"version-history":[{"count":6,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/pages\/10607\/revisions"}],"predecessor-version":[{"id":11356,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/pages\/10607\/revisions\/11356"}],"wp:attachment":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/media?parent=10607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}