File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010import asyncio
1111from typing import List
1212import typer
13+ import docker
1314from rich .console import Console
1415
1516from deadend_cli .core import config_setup
@@ -44,14 +45,15 @@ def chat(
4445 openapi_spec: Path to an OpenAPI spec to load for context.
4546 """
4647 # Check Docker availability first
47- if not check_docker ():
48+ docker_client = docker .from_env ()
49+ if not check_docker (docker_client ):
4850 console .print ("\n [red]Docker is required for this application to function properly.[/red]" )
4951 console .print ("Please install Docker from: https://docs.docker.com/get-docker/" )
5052 console .print ("Make sure Docker daemon is running, then run this command again." )
5153 raise typer .Exit (1 )
5254
5355 # Check pgvector database
54- if not check_pgvector_container ():
56+ if not check_pgvector_container (docker_client ):
5557 console .print ("\n [red]pgvector database is not running.[/red]" )
5658 console .print ("Please run 'deadend-cli init' to set up the required services." )
5759 raise typer .Exit (1 )
@@ -74,10 +76,8 @@ def chat(
7476 finally :
7577 # Stop pgvector container when chat ends
7678 try :
77- import docker
78- docker_client = docker .from_env ()
7979 stop_pgvector_container (docker_client )
80- except Exception as e :
80+ except ( docker . errors . DockerException , OSError , ConnectionError ) as e :
8181 console .print (f"[yellow]Warning: Could not stop pgvector container: { e } [/yellow]" )
8282
8383
Original file line number Diff line number Diff line change 11FROM kalilinux/kali-rolling
2-
2+ ENV DEBIAN_FRONTEND= "noninteractive"
33RUN apt update && apt -y install kali-linux-headless inetutils-*
44
55RUN ["/bin/bash" ]
You can’t perform that action at this time.
0 commit comments