Skip to content

Commit

Permalink
fix launch.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sebovzeoueb committed Mar 14, 2024
1 parent e2e4b9c commit 84cf0f0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
20 changes: 20 additions & 0 deletions concierge_installer/launcher.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import subprocess
from script_builder.util import get_venv_executable

# TODO: these imports seem to mess up the venv
from concierge_backend_lib.status import get_status
from concierge_installer.functions import docker_compose_helper

print("Checking Docker container status...\n")
status = get_status()

if not status["ollama"] or not status["milvus"]:
print("Docker container dependencies don't appear to be running properly.")
compute_method = input("Start docker containers with CPU or GPU? [CPU] or GPU:") or "CPU"
if compute_method == 'GPU':
docker_compose_helper('GPU')
else:
docker_compose_helper('CPU')


subprocess.run([get_venv_executable(), '-m', 'streamlit', 'run', 'Concierge.py'])
18 changes: 1 addition & 17 deletions launch.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
import subprocess
from script_builder.util import get_venv_executable

# TODO: these imports seem to mess up the venv
# from concierge_backend_lib.status import get_status
# from concierge_installer.functions import docker_compose_helper

# print("Checking Docker container status...\n")
# status = get_status()

# if not status["ollama"] or not status["milvus"]:
# print("Docker container dependencies don't appear to be running properly.")
# compute_method = input("Start docker containers with CPU or GPU? [CPU] or GPU:") or "CPU"
# if compute_method == 'GPU':
# docker_compose_helper('GPU')
# else:
# docker_compose_helper('CPU')


subprocess.run([get_venv_executable(), '-m', 'streamlit', 'run', 'Concierge.py'])
subprocess.run([get_venv_executable(), 'concierge_installer/launcher.py'])
2 changes: 1 addition & 1 deletion script_builder/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ def pip_loader():
working_dir = os.getcwd()
venv.create(working_dir, with_pip=True)
# pip install command
subprocess.run([os.path.join(get_venv_executable(), "python"), "-m", "pip", "install", "-r", os.path.abspath("requirements.txt")], cwd=working_dir)
subprocess.run([get_venv_executable(), "-m", "pip", "install", "-r", os.path.abspath("requirements.txt")], cwd=working_dir)

0 comments on commit 84cf0f0

Please sign in to comment.