From 608fc798b065b1f73b696d5f56449ff3f819a6c7 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Tue, 25 Nov 2025 18:09:47 -0300 Subject: [PATCH 01/10] Deleted docker compose cpu, added gpu override --- docker-compose-cpu.yml | 141 ----------------------------------------- docker-compose.gpu.yml | 7 ++ docker-compose.yml | 6 +- 3 files changed, 9 insertions(+), 145 deletions(-) delete mode 100644 docker-compose-cpu.yml create mode 100644 docker-compose.gpu.yml diff --git a/docker-compose-cpu.yml b/docker-compose-cpu.yml deleted file mode 100644 index 50e118b7..00000000 --- a/docker-compose-cpu.yml +++ /dev/null @@ -1,141 +0,0 @@ -services: - opensearch: - image: phact/openrag-opensearch:${OPENRAG_VERSION:-latest} - #build: - # context: . - # dockerfile: Dockerfile - container_name: os - depends_on: - - openrag-backend - environment: - - discovery.type=single-node - - OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_PASSWORD} - # Run security setup in background after OpenSearch starts - command: > - bash -c " - # Ensure data directory has correct permissions - sudo chown -R opensearch:opensearch /usr/share/opensearch/data || true - - # Start OpenSearch in background - /usr/share/opensearch/opensearch-docker-entrypoint.sh opensearch & - - # Wait a bit for OpenSearch to start, then apply security config - sleep 10 && /usr/share/opensearch/setup-security.sh & - - # Wait for background processes - wait - " - ports: - - "9200:9200" - - "9600:9600" - volumes: - - ${OPENSEARCH_DATA_PATH:-./opensearch-data}:/usr/share/opensearch/data:Z - - dashboards: - image: opensearchproject/opensearch-dashboards:3.0.0 - container_name: osdash - depends_on: - - opensearch - environment: - OPENSEARCH_HOSTS: '["https://opensearch:9200"]' - OPENSEARCH_USERNAME: "admin" - OPENSEARCH_PASSWORD: ${OPENSEARCH_PASSWORD} - ports: - - "5601:5601" - - openrag-backend: - image: phact/openrag-backend:${OPENRAG_VERSION:-latest} - # build: - # context: . - # dockerfile: Dockerfile.backend - container_name: openrag-backend - depends_on: - - langflow - environment: - - OPENSEARCH_HOST=opensearch - - LANGFLOW_URL=http://langflow:7860 - - LANGFLOW_PUBLIC_URL=${LANGFLOW_PUBLIC_URL} - - LANGFLOW_AUTO_LOGIN=${LANGFLOW_AUTO_LOGIN} - - LANGFLOW_SECRET_KEY=${LANGFLOW_SECRET_KEY} - - LANGFLOW_SUPERUSER=${LANGFLOW_SUPERUSER} - - LANGFLOW_SUPERUSER_PASSWORD=${LANGFLOW_SUPERUSER_PASSWORD} - - LANGFLOW_CHAT_FLOW_ID=${LANGFLOW_CHAT_FLOW_ID} - - LANGFLOW_INGEST_FLOW_ID=${LANGFLOW_INGEST_FLOW_ID} - - LANGFLOW_URL_INGEST_FLOW_ID=${LANGFLOW_URL_INGEST_FLOW_ID} - - DISABLE_INGEST_WITH_LANGFLOW=${DISABLE_INGEST_WITH_LANGFLOW:-false} - - NUDGES_FLOW_ID=${NUDGES_FLOW_ID} - - OPENSEARCH_PORT=9200 - - OPENSEARCH_USERNAME=admin - - OPENSEARCH_PASSWORD=${OPENSEARCH_PASSWORD} - - OPENAI_API_KEY=${OPENAI_API_KEY} - - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} - - WATSONX_API_KEY=${WATSONX_API_KEY} - - WATSONX_ENDPOINT=${WATSONX_ENDPOINT} - - WATSONX_PROJECT_ID=${WATSONX_PROJECT_ID} - - OLLAMA_ENDPOINT=${OLLAMA_ENDPOINT} - - GOOGLE_OAUTH_CLIENT_ID=${GOOGLE_OAUTH_CLIENT_ID} - - GOOGLE_OAUTH_CLIENT_SECRET=${GOOGLE_OAUTH_CLIENT_SECRET} - - MICROSOFT_GRAPH_OAUTH_CLIENT_ID=${MICROSOFT_GRAPH_OAUTH_CLIENT_ID} - - MICROSOFT_GRAPH_OAUTH_CLIENT_SECRET=${MICROSOFT_GRAPH_OAUTH_CLIENT_SECRET} - - WEBHOOK_BASE_URL=${WEBHOOK_BASE_URL} - - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} - - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} - volumes: - - ./documents:/app/documents:Z - - ./keys:/app/keys:Z - - ./flows:/app/flows:U,z - - openrag-frontend: - image: phact/openrag-frontend:${OPENRAG_VERSION:-latest} - # build: - # context: . - # dockerfile: Dockerfile.frontend - container_name: openrag-frontend - depends_on: - - openrag-backend - environment: - - OPENRAG_BACKEND_HOST=openrag-backend - ports: - - "3000:3000" - - langflow: - volumes: - - ./flows:/app/flows:U,z - image: phact/openrag-langflow:${LANGFLOW_VERSION:-latest} - # build: - # context: . - # dockerfile: Dockerfile.langflow - container_name: langflow - ports: - - "7860:7860" - environment: - - LANGFLOW_DEACTIVATE_TRACING=true - - OPENAI_API_KEY=${OPENAI_API_KEY} - - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} - - WATSONX_API_KEY=${WATSONX_API_KEY} - - WATSONX_ENDPOINT=${WATSONX_ENDPOINT} - - WATSONX_PROJECT_ID=${WATSONX_PROJECT_ID} - - OLLAMA_BASE_URL=${OLLAMA_ENDPOINT} - - LANGFLOW_LOAD_FLOWS_PATH=/app/flows - - LANGFLOW_SECRET_KEY=${LANGFLOW_SECRET_KEY} - - JWT=None - - OWNER=None - - OWNER_NAME=None - - OWNER_EMAIL=None - - CONNECTOR_TYPE=system - - CONNECTOR_TYPE_URL=url - - OPENRAG-QUERY-FILTER="{}" - - OPENSEARCH_PASSWORD=${OPENSEARCH_PASSWORD} - - FILENAME=None - - MIMETYPE=None - - FILESIZE=0 - - LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT=JWT,OPENRAG-QUERY-FILTER,OPENSEARCH_PASSWORD,OWNER,OWNER_NAME,OWNER_EMAIL,CONNECTOR_TYPE,FILENAME,MIMETYPE,FILESIZE - - LANGFLOW_LOG_LEVEL=DEBUG - - LANGFLOW_AUTO_LOGIN=${LANGFLOW_AUTO_LOGIN} - - LANGFLOW_SUPERUSER=${LANGFLOW_SUPERUSER} - - LANGFLOW_SUPERUSER_PASSWORD=${LANGFLOW_SUPERUSER_PASSWORD} - - LANGFLOW_NEW_USER_IS_ACTIVE=${LANGFLOW_NEW_USER_IS_ACTIVE} - - LANGFLOW_ENABLE_SUPERUSER_CLI=${LANGFLOW_ENABLE_SUPERUSER_CLI} - # - DEFAULT_FOLDER_NAME=OpenRAG - - HIDE_GETTING_STARTED_PROGRESS=true - diff --git a/docker-compose.gpu.yml b/docker-compose.gpu.yml new file mode 100644 index 00000000..4496c4ac --- /dev/null +++ b/docker-compose.gpu.yml @@ -0,0 +1,7 @@ +services: + openrag-backend: + environment: + - NVIDIA_DRIVER_CAPABILITIES=compute,utility + - NVIDIA_VISIBLE_DEVICES=all + gpus: all + diff --git a/docker-compose.yml b/docker-compose.yml index 7ba0cea8..2627aa14 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -56,6 +56,7 @@ services: - LANGFLOW_URL=http://langflow:7860 - LANGFLOW_PUBLIC_URL=${LANGFLOW_PUBLIC_URL} - LANGFLOW_AUTO_LOGIN=${LANGFLOW_AUTO_LOGIN} + - LANGFLOW_SECRET_KEY=${LANGFLOW_SECRET_KEY} - LANGFLOW_SUPERUSER=${LANGFLOW_SUPERUSER} - LANGFLOW_SUPERUSER_PASSWORD=${LANGFLOW_SUPERUSER_PASSWORD} - LANGFLOW_CHAT_FLOW_ID=${LANGFLOW_CHAT_FLOW_ID} @@ -72,8 +73,6 @@ services: - WATSONX_ENDPOINT=${WATSONX_ENDPOINT} - WATSONX_PROJECT_ID=${WATSONX_PROJECT_ID} - OLLAMA_ENDPOINT=${OLLAMA_ENDPOINT} - - NVIDIA_DRIVER_CAPABILITIES=compute,utility - - NVIDIA_VISIBLE_DEVICES=all - GOOGLE_OAUTH_CLIENT_ID=${GOOGLE_OAUTH_CLIENT_ID} - GOOGLE_OAUTH_CLIENT_SECRET=${GOOGLE_OAUTH_CLIENT_SECRET} - MICROSOFT_GRAPH_OAUTH_CLIENT_ID=${MICROSOFT_GRAPH_OAUTH_CLIENT_ID} @@ -85,7 +84,6 @@ services: - ./documents:/app/documents:Z - ./keys:/app/keys:Z - ./flows:/app/flows:U,z - gpus: all openrag-frontend: image: phact/openrag-frontend:${OPENRAG_VERSION:-latest} @@ -127,10 +125,10 @@ services: - CONNECTOR_TYPE=system - CONNECTOR_TYPE_URL=url - OPENRAG-QUERY-FILTER="{}" + - OPENSEARCH_PASSWORD=${OPENSEARCH_PASSWORD} - FILENAME=None - MIMETYPE=None - FILESIZE=0 - - OPENSEARCH_PASSWORD=${OPENSEARCH_PASSWORD} - LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT=JWT,OPENRAG-QUERY-FILTER,OPENSEARCH_PASSWORD,OWNER,OWNER_NAME,OWNER_EMAIL,CONNECTOR_TYPE,FILENAME,MIMETYPE,FILESIZE - LANGFLOW_LOG_LEVEL=DEBUG - LANGFLOW_AUTO_LOGIN=${LANGFLOW_AUTO_LOGIN} From 28cb9fc26b80367cd00d85b8f16cdec38d202e21 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Tue, 25 Nov 2025 18:10:02 -0300 Subject: [PATCH 02/10] Changed TUI implementation to support new docker compose override --- src/tui/main.py | 2 +- src/tui/managers/container_manager.py | 132 ++++++++++++++++---------- src/tui/screens/monitor.py | 12 +-- 3 files changed, 91 insertions(+), 55 deletions(-) diff --git a/src/tui/main.py b/src/tui/main.py index 19468473..d27db184 100644 --- a/src/tui/main.py +++ b/src/tui/main.py @@ -485,7 +485,7 @@ def copy_compose_files(*, force: bool = False) -> None: logger.debug(f"Could not access compose assets: {e}") return - for filename in ("docker-compose.yml", "docker-compose-cpu.yml"): + for filename in ("docker-compose.yml", "docker-compose.gpu.yml"): destination = Path(filename) if destination.exists() and not force: continue diff --git a/src/tui/managers/container_manager.py b/src/tui/managers/container_manager.py index 2953d550..53fc385e 100644 --- a/src/tui/managers/container_manager.py +++ b/src/tui/managers/container_manager.py @@ -56,15 +56,15 @@ class ContainerManager: self.platform_detector = PlatformDetector() self.runtime_info = self.platform_detector.detect_runtime() self.compose_file = compose_file or self._find_compose_file("docker-compose.yml") - self.cpu_compose_file = self._find_compose_file("docker-compose-cpu.yml") + self.gpu_compose_file = self._find_compose_file("docker-compose.gpu.yml") self.services_cache: Dict[str, ServiceInfo] = {} self.last_status_update = 0 - # Auto-select CPU compose if no GPU available + # Auto-select GPU override if GPU is available try: has_gpu, _ = detect_gpu_devices() - self.use_cpu_compose = not has_gpu + self.use_gpu_compose = has_gpu except Exception: - self.use_cpu_compose = True + self.use_gpu_compose = False # Expected services based on compose files self.expected_services = [ @@ -143,9 +143,15 @@ class ContainerManager: return False, "", "No container runtime available" if cpu_mode is None: - cpu_mode = self.use_cpu_compose - compose_file = self.cpu_compose_file if cpu_mode else self.compose_file - cmd = self.runtime_info.compose_command + ["-f", str(compose_file)] + args + use_gpu = self.use_gpu_compose + else: + use_gpu = not cpu_mode + + # Build compose command with override pattern + cmd = self.runtime_info.compose_command + ["-f", str(self.compose_file)] + if use_gpu and self.gpu_compose_file.exists(): + cmd.extend(["-f", str(self.gpu_compose_file)]) + cmd.extend(args) try: process = await asyncio.create_subprocess_exec( @@ -179,9 +185,15 @@ class ContainerManager: return if cpu_mode is None: - cpu_mode = self.use_cpu_compose - compose_file = self.cpu_compose_file if cpu_mode else self.compose_file - cmd = self.runtime_info.compose_command + ["-f", str(compose_file)] + args + use_gpu = self.use_gpu_compose + else: + use_gpu = not cpu_mode + + # Build compose command with override pattern + cmd = self.runtime_info.compose_command + ["-f", str(self.compose_file)] + if use_gpu and self.gpu_compose_file.exists(): + cmd.extend(["-f", str(self.gpu_compose_file)]) + cmd.extend(args) try: process = await asyncio.create_subprocess_exec( @@ -242,9 +254,15 @@ class ContainerManager: return if cpu_mode is None: - cpu_mode = self.use_cpu_compose - compose_file = self.cpu_compose_file if cpu_mode else self.compose_file - cmd = self.runtime_info.compose_command + ["-f", str(compose_file)] + args + use_gpu = self.use_gpu_compose + else: + use_gpu = not cpu_mode + + # Build compose command with override pattern + cmd = self.runtime_info.compose_command + ["-f", str(self.compose_file)] + if use_gpu and self.gpu_compose_file.exists(): + cmd.extend(["-f", str(self.gpu_compose_file)]) + cmd.extend(args) try: process = await asyncio.create_subprocess_exec( @@ -551,44 +569,61 @@ class ContainerManager: """Get resolved image names from compose files using docker/podman compose, with robust fallbacks.""" images: set[str] = set() - compose_files = [self.compose_file, self.cpu_compose_file] - for compose_file in compose_files: + # Try both GPU and CPU modes to get all images + for use_gpu in [True, False]: try: - if not compose_file or not compose_file.exists(): - continue + # Build compose command with override pattern + cmd = self.runtime_info.compose_command + ["-f", str(self.compose_file)] + if use_gpu and self.gpu_compose_file.exists(): + cmd.extend(["-f", str(self.gpu_compose_file)]) + cmd.extend(["config", "--format", "json"]) - cpu_mode = (compose_file == self.cpu_compose_file) - - # Try JSON format first - success, stdout, _ = await self._run_compose_command( - ["config", "--format", "json"], - cpu_mode=cpu_mode + process = await asyncio.create_subprocess_exec( + *cmd, + stdout=asyncio.subprocess.PIPE, + stderr=asyncio.subprocess.PIPE, + cwd=Path.cwd(), ) + stdout, stderr = await process.communicate() + stdout_text = stdout.decode() if stdout else "" - if success and stdout.strip(): - from_cfg = self._extract_images_from_compose_config(stdout, tried_json=True) + if process.returncode == 0 and stdout_text.strip(): + from_cfg = self._extract_images_from_compose_config(stdout_text, tried_json=True) if from_cfg: images.update(from_cfg) - continue # this compose file succeeded; move to next file + continue # Fallback to YAML output (for older compose versions) - success, stdout, _ = await self._run_compose_command( - ["config"], - cpu_mode=cpu_mode - ) + cmd = self.runtime_info.compose_command + ["-f", str(self.compose_file)] + if use_gpu and self.gpu_compose_file.exists(): + cmd.extend(["-f", str(self.gpu_compose_file)]) + cmd.append("config") - if success and stdout.strip(): - from_cfg = self._extract_images_from_compose_config(stdout, tried_json=False) + process = await asyncio.create_subprocess_exec( + *cmd, + stdout=asyncio.subprocess.PIPE, + stderr=asyncio.subprocess.PIPE, + cwd=Path.cwd(), + ) + stdout, stderr = await process.communicate() + stdout_text = stdout.decode() if stdout else "" + + if process.returncode == 0 and stdout_text.strip(): + from_cfg = self._extract_images_from_compose_config(stdout_text, tried_json=False) if from_cfg: images.update(from_cfg) continue except Exception: - # Keep behavior resilient—just continue to next file + # Keep behavior resilient—just continue to next mode continue # Fallback: manual parsing if compose config didn't work if not images: + compose_files = [self.compose_file] + if self.gpu_compose_file.exists(): + compose_files.append(self.gpu_compose_file) + for compose in compose_files: try: if not compose.exists(): @@ -638,8 +673,11 @@ class ContainerManager: yield False, "No container runtime available" return - # Diagnostic info about compose files - compose_file = self.cpu_compose_file if (cpu_mode if cpu_mode is not None else self.use_cpu_compose) else self.compose_file + # Determine GPU mode + if cpu_mode is None: + use_gpu = self.use_gpu_compose + else: + use_gpu = not cpu_mode # Show the search process for debugging if hasattr(self, '_compose_search_log'): @@ -650,9 +688,12 @@ class ContainerManager: # Show runtime detection info runtime_cmd_str = " ".join(self.runtime_info.compose_command) yield False, f"Using compose command: {runtime_cmd_str}", False - yield False, f"Final compose file: {compose_file.absolute()}", False - if not compose_file.exists(): - yield False, f"ERROR: Compose file not found at {compose_file.absolute()}", False + compose_files_str = str(self.compose_file.absolute()) + if use_gpu and self.gpu_compose_file.exists(): + compose_files_str += f" + {self.gpu_compose_file.absolute()}" + yield False, f"Compose files: {compose_files_str}", False + if not self.compose_file.exists(): + yield False, f"ERROR: Base compose file not found at {self.compose_file.absolute()}", False return yield False, "Starting OpenRAG services...", False @@ -786,16 +827,11 @@ class ContainerManager: yield "No container runtime available" return - compose_file = ( - self.cpu_compose_file if self.use_cpu_compose else self.compose_file - ) - cmd = self.runtime_info.compose_command + [ - "-f", - str(compose_file), - "logs", - "-f", - service_name, - ] + # Build compose command with override pattern + cmd = self.runtime_info.compose_command + ["-f", str(self.compose_file)] + if self.use_gpu_compose and self.gpu_compose_file.exists(): + cmd.extend(["-f", str(self.gpu_compose_file)]) + cmd.extend(["logs", "-f", service_name]) try: process = await asyncio.create_subprocess_exec( diff --git a/src/tui/screens/monitor.py b/src/tui/screens/monitor.py index 01c243c6..99e7a040 100644 --- a/src/tui/screens/monitor.py +++ b/src/tui/screens/monitor.py @@ -581,22 +581,22 @@ class MonitorScreen(Screen): def _update_mode_row(self) -> None: """Update the mode indicator and toggle button label.""" try: - use_cpu = getattr(self.container_manager, "use_cpu_compose", True) + use_gpu = getattr(self.container_manager, "use_gpu_compose", False) indicator = self.query_one("#mode-indicator", Static) - mode_text = "Mode: CPU (no GPU detected)" if use_cpu else "Mode: GPU" + mode_text = "Mode: GPU" if use_gpu else "Mode: CPU (no GPU detected)" indicator.update(mode_text) toggle_btn = self.query_one("#toggle-mode-btn", Button) - toggle_btn.label = "Switch to GPU Mode" if use_cpu else "Switch to CPU Mode" + toggle_btn.label = "Switch to CPU Mode" if use_gpu else "Switch to GPU Mode" except Exception: pass def action_toggle_mode(self) -> None: """Toggle between CPU/GPU compose files and refresh view.""" try: - current = getattr(self.container_manager, "use_cpu_compose", True) - self.container_manager.use_cpu_compose = not current + current = getattr(self.container_manager, "use_gpu_compose", False) + self.container_manager.use_gpu_compose = not current self.notify( - "Switched to GPU compose" if not current else "Switched to CPU compose", + "Switched to GPU mode" if not current else "Switched to CPU mode", severity="information", ) self._update_mode_row() From 67e31dbbe42f25959c8de5e9c87895993f0ebd97 Mon Sep 17 00:00:00 2001 From: phact Date: Wed, 26 Nov 2025 06:01:04 -0500 Subject: [PATCH 03/10] symlinks --- src/tui/_assets/docker-compose-cpu.yml | 1 - src/tui/_assets/docker-compose.gpu.yml | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 120000 src/tui/_assets/docker-compose-cpu.yml create mode 120000 src/tui/_assets/docker-compose.gpu.yml diff --git a/src/tui/_assets/docker-compose-cpu.yml b/src/tui/_assets/docker-compose-cpu.yml deleted file mode 120000 index 5ad7a663..00000000 --- a/src/tui/_assets/docker-compose-cpu.yml +++ /dev/null @@ -1 +0,0 @@ -../../../docker-compose-cpu.yml \ No newline at end of file diff --git a/src/tui/_assets/docker-compose.gpu.yml b/src/tui/_assets/docker-compose.gpu.yml new file mode 120000 index 00000000..bfebbedd --- /dev/null +++ b/src/tui/_assets/docker-compose.gpu.yml @@ -0,0 +1 @@ +../../../docker-compose.gpu.yml \ No newline at end of file From 71eaa1c1e2d9e1468350e06ae1e6e6e222b38381 Mon Sep 17 00:00:00 2001 From: phact Date: Wed, 26 Nov 2025 06:17:20 -0500 Subject: [PATCH 04/10] monitor actually displays and sticks across navigation --- src/tui/screens/monitor.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/tui/screens/monitor.py b/src/tui/screens/monitor.py index 99e7a040..7d7269ab 100644 --- a/src/tui/screens/monitor.py +++ b/src/tui/screens/monitor.py @@ -33,13 +33,14 @@ class MonitorScreen(Screen): ("u", "upgrade", "Upgrade"), ("x", "reset", "Reset"), ("l", "logs", "View Logs"), + ("g", "toggle_mode", "Toggle GPU/CPU"), ("j", "cursor_down", "Move Down"), ("k", "cursor_up", "Move Up"), ] def __init__(self): super().__init__() - self.container_manager = ContainerManager() + self._container_manager = None # Use app's shared instance self.docling_manager = DoclingManager() self.services_table = None self.docling_table = None @@ -52,6 +53,13 @@ class MonitorScreen(Screen): # Track which table was last selected for mutual exclusion self._last_selected_table = None + @property + def container_manager(self) -> ContainerManager: + """Get the shared container manager from the app.""" + if self._container_manager is None: + self._container_manager = self.app.container_manager + return self._container_manager + def on_unmount(self) -> None: """Clean up when the screen is unmounted.""" if hasattr(self, 'docling_manager'): @@ -69,10 +77,10 @@ class MonitorScreen(Screen): def _create_services_tab(self) -> ComposeResult: """Create the services monitoring tab.""" - # Current mode indicator + toggle + # GPU/CPU mode section + yield Static("GPU Mode", id="mode-indicator", classes="tab-header") yield Horizontal( - Static("", id="mode-indicator"), - Button("Toggle Mode", id="toggle-mode-btn"), + Button("Switch to CPU Mode", id="toggle-mode-btn"), classes="button-row", id="mode-row", ) @@ -583,8 +591,7 @@ class MonitorScreen(Screen): try: use_gpu = getattr(self.container_manager, "use_gpu_compose", False) indicator = self.query_one("#mode-indicator", Static) - mode_text = "Mode: GPU" if use_gpu else "Mode: CPU (no GPU detected)" - indicator.update(mode_text) + indicator.update("GPU Mode" if use_gpu else "CPU Mode") toggle_btn = self.query_one("#toggle-mode-btn", Button) toggle_btn.label = "Switch to CPU Mode" if use_gpu else "Switch to GPU Mode" except Exception: From 24c006128cbacda15f37bd8b87c345648363aea5 Mon Sep 17 00:00:00 2001 From: phact Date: Wed, 26 Nov 2025 06:31:15 -0500 Subject: [PATCH 05/10] remove the secret --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2627aa14..7954d1bc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -56,7 +56,6 @@ services: - LANGFLOW_URL=http://langflow:7860 - LANGFLOW_PUBLIC_URL=${LANGFLOW_PUBLIC_URL} - LANGFLOW_AUTO_LOGIN=${LANGFLOW_AUTO_LOGIN} - - LANGFLOW_SECRET_KEY=${LANGFLOW_SECRET_KEY} - LANGFLOW_SUPERUSER=${LANGFLOW_SUPERUSER} - LANGFLOW_SUPERUSER_PASSWORD=${LANGFLOW_SUPERUSER_PASSWORD} - LANGFLOW_CHAT_FLOW_ID=${LANGFLOW_CHAT_FLOW_ID} From d1b7a36801b341f23596816233f86b256cb4f541 Mon Sep 17 00:00:00 2001 From: phact Date: Wed, 26 Nov 2025 06:32:38 -0500 Subject: [PATCH 06/10] integration test cleanup --- .github/workflows/test-integration.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index 92c9a976..0ef50684 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -39,6 +39,9 @@ jobs: - run: df -h + - name: Cleanup + run: sudo rm -rf opensearch-data + - name: Checkout uses: actions/checkout@v4 From 9e8936e2b84933af099cd36b56d1b7a92526f86e Mon Sep 17 00:00:00 2001 From: phact Date: Wed, 26 Nov 2025 06:33:51 -0500 Subject: [PATCH 07/10] comment - integration test cleanup --- .github/workflows/test-integration.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index 0ef50684..635552f0 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -39,8 +39,8 @@ jobs: - run: df -h - - name: Cleanup - run: sudo rm -rf opensearch-data + #- name: Cleanup + # run: sudo rm -rf opensearch-data - name: Checkout uses: actions/checkout@v4 From 5df25e21fe935451082110c2341bed2f010cdb88 Mon Sep 17 00:00:00 2001 From: phact Date: Wed, 26 Nov 2025 06:35:36 -0500 Subject: [PATCH 08/10] chown instead --- .github/workflows/test-integration.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index 635552f0..aab34d2a 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -39,8 +39,8 @@ jobs: - run: df -h - #- name: Cleanup - # run: sudo rm -rf opensearch-data + - name: Fix permissions for opensearch-data + run: sudo chown -R $(whoami) opensearch-data && chmod -R u+w opensearch-data - name: Checkout uses: actions/checkout@v4 From b92f4fdfb3ae4480e9d51bb1977245d8d27c01d4 Mon Sep 17 00:00:00 2001 From: phact Date: Wed, 26 Nov 2025 06:40:30 -0500 Subject: [PATCH 09/10] rm full path --- .github/workflows/test-integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index aab34d2a..604f608a 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -40,7 +40,7 @@ jobs: - run: df -h - name: Fix permissions for opensearch-data - run: sudo chown -R $(whoami) opensearch-data && chmod -R u+w opensearch-data + run: sudo rm -rf /opt/actions-runner/_work/openrag/openrag/opensearch-data/* - name: Checkout uses: actions/checkout@v4 From 157cebff4e705b9af97fdf2ce608e439a514e920 Mon Sep 17 00:00:00 2001 From: phact Date: Wed, 26 Nov 2025 06:43:50 -0500 Subject: [PATCH 10/10] rm with docker compose --- .github/workflows/test-integration.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index 604f608a..a70dd24d 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -36,12 +36,10 @@ jobs: run: | docker system prune -af || true docker builder prune -af || true + docker-compose -f docker-compose.yml down -v --remove-orphans || true - run: df -h - - name: Fix permissions for opensearch-data - run: sudo rm -rf /opt/actions-runner/_work/openrag/openrag/opensearch-data/* - - name: Checkout uses: actions/checkout@v4