services: swarms-agent-server: image: python:3.12-slim volumes: - swarms:/app restart: always environment: - OPENAI_API_KEY=${OPENAI_API_KEY} command: # Run swarms agent example - /bin/sh - -c - | # install dependencies apt update && apt install -y git python3-pip mkdir -p /app && cd /app git clone --depth 1 https://github.com/The-Swarm-Corporation/swarms-examples cd swarms-examples/ pip install -r requirements.txt && pip install langchain-community langchain-core cd examples/agents/ python o1_preview.py # keep container running sleep infinity volumes: swarms: