diff --git a/ai-service/README.md b/ai-service/README.md index 913973222..963652364 100644 --- a/ai-service/README.md +++ b/ai-service/README.md @@ -17,7 +17,7 @@ cd ai-service Install the dependencies: ``` -bun install +pnpm install ``` Make sure you set the environment variables as found in `.env.example`. @@ -25,23 +25,24 @@ Make sure you set the environment variables as found in `.env.example`. Then, run the server: ``` -bun run dev +pnpm run dev ``` -## Setting up Open Runtime +## Running in Docker -Create a new empty directory for the workspace and take note of its path: +Make sure the environment variables are set in the `.env` file. + +Then, run the following command: ``` -cd ai-service -mkdir -p tmp/workspace -export WORK_DIR="$(pwd)/tmp/workspace" # This is important for the next step -``` -Checkout the open-runtime repository and run the latest version: - -``` -cd runtimes/workspace/latest -PORT=3010 WORK_DIR=$WORK_DIR pnpx nodemon src/server.js +docker compose up --build ``` -You should be good to go! \ No newline at end of file +## Console + +In the Console project, make sure you set: +``` +PUBLIC_AI_SERVICE_BASE_URL=http://localhost:8889 +``` + +Enjoy! \ No newline at end of file diff --git a/ai-service/docker-compose.yml b/ai-service/docker-compose.yml index f4eb95da0..99d7ade2b 100644 --- a/ai-service/docker-compose.yml +++ b/ai-service/docker-compose.yml @@ -10,4 +10,6 @@ services: required: true environment: SYNAPSE_ENDPOINT: http://host.docker.internal:3001 - APPWRITE_ENDPOINT: http://host.docker.internal:80/v1 \ No newline at end of file + APPWRITE_ENDPOINT: http://host.docker.internal:80/v1 + volumes: + - ./tmp:/app/tmp \ No newline at end of file