From 50d8405981823143506416d1faafefefb8509e3e Mon Sep 17 00:00:00 2001 From: Debanjum Date: Wed, 20 Nov 2024 14:01:21 -0800 Subject: [PATCH] Enable khoj to use terrarium code sandbox as tool in eval workflow --- .github/workflows/run_evals.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_evals.yml b/.github/workflows/run_evals.yml index 46c6d11c..e77dcbfd 100644 --- a/.github/workflows/run_evals.yml +++ b/.github/workflows/run_evals.yml @@ -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