diff --git a/Dockerfile b/Dockerfile index eeade7c1..fd37d15f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ RUN apt update -y && apt -y install \ libgl1 \ libglx-mesa0 \ libglib2.0-0 \ + docker.io \ # Required by llama-cpp-python pre-built wheels. See #1628 musl-dev && \ ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1 && \ diff --git a/docker-compose.yml b/docker-compose.yml index a604a788..27815179 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,6 +28,7 @@ services: # Creates Computer for Khoj to use. # Set KHOJ_OPERATOR_ENABLED=True in the server service environment variable to enable. computer: + container_name: khoj-computer image: ghcr.io/khoj-ai/khoj-computer:latest ports: - "5900:5900" @@ -55,6 +56,8 @@ services: - khoj_config:/root/.khoj/ - khoj_models:/root/.cache/torch/sentence_transformers - khoj_models:/root/.cache/huggingface + # uncomment line below to mount docker socket to allow khoj to use its computer. + # - /var/run/docker.sock:/var/run/docker.sock # Use 0.0.0.0 to explicitly set the host ip for the service on the container. https://pythonspeed.com/articles/docker-connection-refused/ environment: - POSTGRES_DB=postgres diff --git a/pyproject.toml b/pyproject.toml index 5ed90660..641466a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -113,8 +113,6 @@ prod = [ ] local = [ "pgserver == 0.1.4", - "playwright >= 1.49.0", - "pyautogui == 0.9.54", ] dev = [ "khoj[prod,local]", diff --git a/src/khoj/processor/operator/README.md b/src/khoj/processor/operator/README.md index 6b835099..afcacf5c 100644 --- a/src/khoj/processor/operator/README.md +++ b/src/khoj/processor/operator/README.md @@ -16,9 +16,10 @@ Give Khoj its own computer to operate in a transparent, controlled manner. Accom wget https://raw.githubusercontent.com/khoj-ai/khoj/master/docker-compose.yml ``` -2. Configure environment variables in `docker-compose.yml` +2. Update the `docker-compose.yml` to enable computer operator - Set `ANTHROPIC_API_KEY` to your [Anthropic API key](https://console.anthropic.com/settings/keys) - Uncomment `KHOJ_OPERATOR_ENABLED=True` to enable the operator tool + - Uncomment `- /var/run/docker.sock:/var/run/docker.sock` to mount docker socket to allow khoj to operate its computer container. 3. Start Khoj services ```shell