mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 13:18:18 +00:00
Fixes to enable dockerized khoj to operate its computer
This commit is contained in:
@@ -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 && \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -113,8 +113,6 @@ prod = [
|
||||
]
|
||||
local = [
|
||||
"pgserver == 0.1.4",
|
||||
"playwright >= 1.49.0",
|
||||
"pyautogui == 0.9.54",
|
||||
]
|
||||
dev = [
|
||||
"khoj[prod,local]",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user