mirror of
https://github.com/camel-ai/owl.git
synced 2026-03-22 14:07:17 +08:00
update readme
This commit is contained in:
147
README.md
147
README.md
@@ -160,9 +160,29 @@ This video demonstrates how to install OWL locally and showcases its capabilitie
|
||||
|
||||
# 🛠️ Installation
|
||||
|
||||
OWL supports multiple installation methods to fit your workflow preferences. Choose the option that works best for you.
|
||||
## **Prerequisites**
|
||||
|
||||
## Option 1: Using uv (Recommended)
|
||||
### Install Python
|
||||
Before installing OWL, ensure you have Python installed (version 3.10, 3.11, or 3.12 is supported):
|
||||
|
||||
```bash
|
||||
# Check if Python is installed
|
||||
python --version
|
||||
|
||||
# If not installed, download and install from https://www.python.org/downloads/
|
||||
# For macOS users with Homebrew:
|
||||
brew install python@3.10
|
||||
|
||||
# For Ubuntu/Debian:
|
||||
sudo apt update
|
||||
sudo apt install python3.10 python3.10-venv python3-pip
|
||||
```
|
||||
|
||||
## **Installation Options**
|
||||
|
||||
OWL supports multiple installation methods to fit your workflow preferences.
|
||||
|
||||
### Option 1: Using uv (Recommended)
|
||||
|
||||
```bash
|
||||
# Clone github repo
|
||||
@@ -175,7 +195,6 @@ cd owl
|
||||
pip install uv
|
||||
|
||||
# Create a virtual environment and install dependencies
|
||||
# We support using Python 3.10, 3.11, 3.12
|
||||
uv venv .venv --python=3.10
|
||||
|
||||
# Activate the virtual environment
|
||||
@@ -186,12 +205,9 @@ source .venv/bin/activate
|
||||
|
||||
# Install CAMEL with all dependencies
|
||||
uv pip install -e .
|
||||
|
||||
# Exit the virtual environment when done
|
||||
deactivate
|
||||
```
|
||||
|
||||
## Option 2: Using venv and pip
|
||||
### Option 2: Using venv and pip
|
||||
|
||||
```bash
|
||||
# Clone github repo
|
||||
@@ -214,7 +230,7 @@ source .venv/bin/activate
|
||||
pip install -r requirements.txt --use-pep517
|
||||
```
|
||||
|
||||
## Option 3: Using conda
|
||||
### Option 3: Using conda
|
||||
|
||||
```bash
|
||||
# Clone github repo
|
||||
@@ -234,70 +250,11 @@ pip install -e .
|
||||
|
||||
# Option 2: Install from requirements.txt
|
||||
pip install -r requirements.txt --use-pep517
|
||||
|
||||
# Exit the conda environment when done
|
||||
conda deactivate
|
||||
```
|
||||
|
||||
## **Setup Environment Variables**
|
||||
### Option 4: Using Docker
|
||||
|
||||
OWL requires various API keys to interact with different services. The `owl/.env_template` file contains placeholders for all necessary API keys along with links to the services where you can register for them.
|
||||
|
||||
### Option 1: Using a `.env` File (Recommended)
|
||||
|
||||
1. **Copy and Rename the Template**:
|
||||
```bash
|
||||
cd owl
|
||||
cp .env_template .env
|
||||
```
|
||||
|
||||
2. **Configure Your API Keys**:
|
||||
Open the `.env` file in your preferred text editor and insert your API keys in the corresponding fields.
|
||||
|
||||
> **Note**: For the minimal example (`examples/run_mini.py`), you only need to configure the LLM API key (e.g., `OPENAI_API_KEY`).
|
||||
|
||||
### Option 2: Setting Environment Variables Directly
|
||||
|
||||
Alternatively, you can set environment variables directly in your terminal:
|
||||
|
||||
- **macOS/Linux (Bash/Zsh)**:
|
||||
```bash
|
||||
export OPENAI_API_KEY="your-openai-api-key-here"
|
||||
```
|
||||
|
||||
- **Windows (Command Prompt)**:
|
||||
```batch
|
||||
set OPENAI_API_KEY="your-openai-api-key-here"
|
||||
```
|
||||
|
||||
- **Windows (PowerShell)**:
|
||||
```powershell
|
||||
$env:OPENAI_API_KEY = "your-openai-api-key-here"
|
||||
```
|
||||
|
||||
> **Note**: Environment variables set directly in the terminal will only persist for the current session.
|
||||
|
||||
|
||||
|
||||
## **Running with Docker**
|
||||
|
||||
OWL can be easily deployed using Docker, which provides a consistent environment across different platforms.
|
||||
|
||||
### **Setup Instructions**
|
||||
|
||||
```bash
|
||||
# Clone the repository
|
||||
git clone https://github.com/camel-ai/owl.git
|
||||
cd owl
|
||||
|
||||
# Configure environment variables
|
||||
cp owl/.env_template owl/.env
|
||||
# Edit the .env file and fill in your API keys
|
||||
```
|
||||
|
||||
### **Deployment Options**
|
||||
|
||||
#### **Option 1: Using Pre-built Image (Recommended)**
|
||||
#### **Using Pre-built Image (Recommended)**
|
||||
|
||||
```bash
|
||||
# This option downloads a ready-to-use image from Docker Hub
|
||||
@@ -311,7 +268,7 @@ playwright install-deps
|
||||
xvfb-python examples/run.py
|
||||
```
|
||||
|
||||
#### **Option 2: Building Image Locally**
|
||||
#### **Building Image Locally**
|
||||
|
||||
```bash
|
||||
# For users who need to customize the Docker image or cannot access Docker Hub:
|
||||
@@ -328,7 +285,7 @@ playwright install-deps
|
||||
xvfb-python examples/run.py
|
||||
```
|
||||
|
||||
#### **Option 3: Using Convenience Scripts**
|
||||
#### **Using Convenience Scripts**
|
||||
|
||||
```bash
|
||||
# Navigate to container directory
|
||||
@@ -342,6 +299,54 @@ chmod +x build_docker.sh
|
||||
./run_in_docker.sh "your question"
|
||||
```
|
||||
|
||||
## **Setup Environment Variables**
|
||||
|
||||
OWL requires various API keys to interact with different services.
|
||||
|
||||
### Setting Environment Variables Directly
|
||||
|
||||
You can set environment variables directly in your terminal:
|
||||
|
||||
- **macOS/Linux (Bash/Zsh)**:
|
||||
```bash
|
||||
export OPENAI_API_KEY="your-openai-api-key-here"
|
||||
# Add other required API keys as needed
|
||||
```
|
||||
|
||||
- **Windows (Command Prompt)**:
|
||||
```batch
|
||||
set OPENAI_API_KEY=your-openai-api-key-here
|
||||
```
|
||||
|
||||
- **Windows (PowerShell)**:
|
||||
```powershell
|
||||
$env:OPENAI_API_KEY = "your-openai-api-key-here"
|
||||
```
|
||||
|
||||
> **Note**: Environment variables set directly in the terminal will only persist for the current session.
|
||||
|
||||
### Alternative: Using a `.env` File
|
||||
|
||||
If you prefer using a `.env` file instead, you can:
|
||||
|
||||
1. **Copy and Rename the Template**:
|
||||
```bash
|
||||
# For macOS/Linux
|
||||
cd owl
|
||||
cp .env_template .env
|
||||
|
||||
# For Windows
|
||||
cd owl
|
||||
copy .env_template .env
|
||||
```
|
||||
|
||||
Alternatively, you can manually create a new file named `.env` in the owl directory and copy the contents from `.env_template`.
|
||||
|
||||
2. **Configure Your API Keys**:
|
||||
Open the `.env` file in your preferred text editor and insert your API keys in the corresponding fields.
|
||||
|
||||
> **Note**: For the minimal example (`examples/run_mini.py`), you only need to configure the LLM API key (e.g., `OPENAI_API_KEY`).
|
||||
|
||||
### **MCP Desktop Commander Setup**
|
||||
|
||||
If using MCP Desktop Commander within Docker, run:
|
||||
|
||||
Reference in New Issue
Block a user