Enable khoj to use terrarium code sandbox as tool in eval workflow

This commit is contained in:
Debanjum 2024-11-20 14:01:21 -08:00
parent 2203236e4c
commit 50d8405981

View file

@ -73,10 +73,13 @@ jobs:
env:
DEBIAN_FRONTEND: noninteractive
run: |
# install postgres and other dependencies
apt update && apt install -y git python3-pip libegl1 sqlite3 libsqlite3-dev libsqlite3-0 ffmpeg libsm6 libxext6
apt install -y postgresql postgresql-client && apt install -y postgresql-server-dev-14
python -m ensurepip --upgrade
python -m pip install --upgrade pip
# upgrade pip
python -m ensurepip --upgrade && python -m pip install --upgrade pip
# install terrarium for code sandbox
git clone https://github.com/cohere-ai/cohere-terrarium.git && cd cohere-terrarium && npm install && mkdir pyodide_cache
- name: ⬇️ Install Application
run: |
@ -101,12 +104,14 @@ jobs:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
KHOJ_DEBUG: "False" # To disable prompt tracer
KHOJ_TELEMETRY_DISABLE: "True" # To disable telemetry for tests
run: |
# Start Khoj server in background
khoj --anonymous-mode --non-interactive &
# Start code sandbox
npm run dev --prefix cohere-terrarium &
# Wait for server to be ready
timeout=120
while ! curl -s http://localhost:42110/api/health > /dev/null; do