Notes/warning on docker like environments

This commit is contained in:
erew123 authored and GitHub committed 2024-07-27 09:17:20 +01:00
1 parent 6fac1aa5f9
commit 5257497b57
1 file changed
+13 -6
+13 -6
View File
@@ -346,9 +346,16 @@ signal.signal(signal.SIGINT, signal_handler)
# Check if we're running in docker # Check if we're running in docker
if os.path.isfile("/.dockerenv") and 'google.colab' not in sys.modules: if os.path.isfile("/.dockerenv") and 'google.colab' not in sys.modules:
print(f"[{branding}TTS] \033[94mRunning in Docker. Please wait.\033[0m") print(f"[{branding}TTS] \033[94mRunning in Docker environment. Please note:\033[0m")
else: print(f"[{branding}TTS] - Docker like environments are a work in progress.")
# Start the subprocess print(f"[{branding}TTS] - On a LAN environment, as long as you expose the Gradio and API ports correctly, this should work.")
print(f"[{branding}TTS] - On a routed Internet environment, a VPN to the host server OR secure tunnel will be required for")
print(f"[{branding}TTS] both addresses and additionally Gradio is yet to be re-coded to handle a custom API address, so")
print(f"[{branding}TTS] the Gradio interface will not work correctly as of yet.")
print(f"[{branding}TTS] Internal API address: http://localhost:{params['api_def']['api_port_number']}")
print(f"[{branding}TTS] Internal Gradio address: http://localhost:{params['gradio_port_number']}")
# Start the subprocess (now unified for both Docker and non-Docker environments)
process = subprocess.Popen(["python", script_path]) process = subprocess.Popen(["python", script_path])
# Check if the subprocess has started successfully # Check if the subprocess has started successfully
@@ -359,11 +366,11 @@ else:
print(f"[{branding}TTS]") print(f"[{branding}TTS]")
else: else:
print(f"[{branding}TTS] \033[91mWarning\033[0m TTS Subprocess Webserver failing to start process") print(f"[{branding}TTS] \033[91mWarning\033[0m TTS Subprocess Webserver failing to start process")
print(f"[{branding}TTS] \033[91mWarning\033[0m It could be that you have something on port:",params["port_number"],) print(f"[{branding}TTS] \033[91mWarning\033[0m It could be that you have something on port:", params["port_number"])
print(f"[{branding}TTS] \033[91mWarning\033[0m Or you have not started in a Python environement with all the necesssary bits installed") print(f"[{branding}TTS] \033[91mWarning\033[0m Or you have not started in a Python environment with all the necessary bits installed")
print(f"[{branding}TTS] \033[91mWarning\033[0m Check you are starting Text-generation-webui with either the start_xxxxx file or the Python environment with cmd_xxxxx file.") print(f"[{branding}TTS] \033[91mWarning\033[0m Check you are starting Text-generation-webui with either the start_xxxxx file or the Python environment with cmd_xxxxx file.")
print(f"[{branding}TTS] \033[91mWarning\033[0m xxxxx is the type of OS you are on e.g. windows, linux or mac.") print(f"[{branding}TTS] \033[91mWarning\033[0m xxxxx is the type of OS you are on e.g. windows, linux or mac.")
print(f"[{branding}TTS] \033[91mWarning\033[0m Alternatively, you could check no other Python processes are running that shouldnt be e.g. Restart your computer is the simple way.") print(f"[{branding}TTS] \033[91mWarning\033[0m Alternatively, you could check no other Python processes are running that shouldn't be e.g. Restart your computer is the simple way.")
# Cleanly kill off this script, but allow text-generation-webui to keep running, albeit without this alltalk_tts # Cleanly kill off this script, but allow text-generation-webui to keep running, albeit without this alltalk_tts
sys.exit(1) sys.exit(1)