From 3b77886fd4ea58ee62e4820ffe738d856a197fda Mon Sep 17 00:00:00 2001 From: Nick Mote Date: Mon, 20 Jan 2025 10:09:21 -0800 Subject: [PATCH 1/2] Adding Initial Docker File --- Dockerfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..f82763e0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM node:20 + +# Set the working directory in the container +WORKDIR /app + +# Copy package.json and package-lock.json files +COPY package*.json ./ + +# Install dependencies +RUN npm install + +# Copy the rest of the application code +COPY . . + +# Expose the port the app runs on +EXPOSE 3000 + +# Start the app +CMD ["npm", "run", "dev"] + + From e2c82d7c61e0674e3a4fc3515bf87d18c41ca115 Mon Sep 17 00:00:00 2001 From: Nick Mote Date: Mon, 20 Jan 2025 10:09:40 -0800 Subject: [PATCH 2/2] Updating README to include Docker Instructions --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 4e75c1a5..b94eaa4d 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,25 @@ You should be able to use this repo to prototype your own multi-agent realtime v - Start the server with `npm run dev` - Open your browser to [http://localhost:3000](http://localhost:3000) to see the app. It should automatically connect to the `simpleExample` Agent Set. +## Alternative Docker Setup + +- You can also run this in a Docker container. +- Build the Docker image with the following command: + + ```bash + docker build -t realtime-api-agents-demo . + ``` + +- Run the Docker container with the following command: + + ```bash + docker run -it --rm -p 3000:3000 + -e OPENAI_API_KEY=replace-with-api-key + -v local-copy-of/openai-realtime-agents:/app + -v /app/node_modules + realtime-api-agents-demo + ``` + ## Configuring Agents Configuration in `src/app/agentConfigs/simpleExample.ts` ```javascript