Merge pull request #289 from Chaudry24/mc/uv-integration

Updated to uv package manager for easier onboarding
This commit is contained in:
Martin
2025-06-04 19:47:15 +02:00
committed by GitHub
13 changed files with 3916 additions and 91 deletions
+1
View File
@@ -0,0 +1 @@
3.10
+15 -6
View File
@@ -52,12 +52,21 @@ cd agenticSeek
mv .env.example .env
```
### 2 **Create a virtual env**
## Step 2: Install UV Package Manager
```sh
python3 -m venv agentic_seek_env
source agentic_seek_env/bin/activate
# On Windows: agentic_seek_env\Scripts\activate
### For Linux/macOS:
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
### For Windows:
```powershell
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
```
## Step 3: Create Virtual Environment
```bash
uv venv
```
### 3️⃣ **Install package**
@@ -228,7 +237,7 @@ Next step: [Start services and run AgenticSeek](#Start-services-and-Run)
Activate your python env if needed.
```sh
source agentic_seek_env/bin/activate
source .venv/bin/activate
```
Start required services. This will start all services from the docker-compose.yml, including:
+16 -7
View File
@@ -46,15 +46,24 @@ cd agenticSeek
mv .env.example .env
```
### 2 **建立虚拟环境**
## 2⃣ 安装 UV 包管理器
```sh
python3 -m venv agentic_seek_env
source agentic_seek_env/bin/activate
# On Windows: agentic_seek_env\Scripts\activate
### Linux/macOS:
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
### 3️⃣ **安装所需套件**
### Windows:
```powershell
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
```
## 3️⃣ 创建虚拟环境
```bash
uv venv
```
### 4️⃣ **安装所需套件**
**自动安装:**
@@ -196,7 +205,7 @@ provider_server_address = 127.0.0.1:5000
如果需要,请激活你的 Python 环境。
```sh
source agentic_seek_env/bin/activate
source .venv/bin/activate
```
启动所需的服务。这将启动 `docker-compose.yml` 中的所有服务,包括:
+16 -7
View File
@@ -41,15 +41,24 @@ cd agenticSeek
mv .env.example .env
```
### 2 **建立虛擬環境**
## 2⃣ 安裝 UV 套件管理器
```sh
python3 -m venv agentic_seek_env
source agentic_seek_env/bin/activate
# On Windows: agentic_seek_env\Scripts\activate
### Linux/macOS:
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
### 3️⃣ **安裝所需套件**
### Windows:
```powershell
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
```
## 3️⃣ 建立虛擬環境
```bash
uv venv
```
### 4️⃣ **安裝所需套件**
**自動安裝:**
@@ -189,7 +198,7 @@ provider_server_address = 127.0.0.1:5000
如果需要,請啟用你的 Python 環境。
```sh
source agentic_seek_env/bin/activate
source .venv/bin/activate
```
啟動所需的服務。這將啟動 `docker-compose.yml` 中的所有服務,包括:
+16 -7
View File
@@ -57,15 +57,24 @@ cd agenticSeek
mv .env.example .env
```
### 2 **Créer un environnement virtuel**
## 2️⃣ Installer le gestionnaire de paquets UV
```sh
python3 -m venv agentic_seek_env
source agentic_seek_env/bin/activate
# Sur Windows: agentic_seek_env\Scripts\activate
### Pour Linux/macOS:
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
### 3️⃣ **Installation**
### Pour Windows:
```powershell
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
```
## 3️⃣ Créer un environnement virtuel
```bash
uv venv
```
### 4️⃣ **Installation**
**Automatique:**
@@ -166,7 +175,7 @@ Remarque : Certains fournisseurs (ex : lm-studio) nécessitent `http://` devant
Activez votre environnement Python si nécessaire.
```sh
source agentic_seek_env/bin/activate
source .venv/bin/activate
```
Démarrez les services requis. Cela lancera tous les services définis dans le fichier docker-compose.yml, y compris :
+16 -7
View File
@@ -50,15 +50,24 @@ cd agenticSeek
mv .env.example .env
```
### 2 **仮想環境の作成**
## 2⃣ UVパッケージマネージャーのインストール
```sh
python3 -m venv agentic_seek_env
source agentic_seek_env/bin/activate
# Windowsの場合: agentic_seek_env\Scripts\activate
### Linux/macOS:
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
### 3️⃣ **パッケージのインストール**
### Windows:
```powershell
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
```
## 3️⃣ 仮想環境の作成
```bash
uv venv
```
### 4️⃣ **パッケージのインストール**
Python、Dockerとdocker compose、Google Chromeがインストールされていることを確認してください。
@@ -237,7 +246,7 @@ APIキーをエクスポートします:`export <<PROVIDER>>_API_KEY="xxx"`
必要に応じてPython環境をアクティブ化します。
```sh
source agentic_seek_env/bin/activate
source .venv/bin/activate
```
必要なサービスを開始します。これにより、docker-compose.ymlからすべてのサービスが開始されます。これには以下が含まれます:
+19 -8
View File
@@ -63,17 +63,24 @@ cd agenticSeek
mv .env.example .env
```
### 2️⃣ Crie um ambiente virtual
## 2️⃣ Instale o Gerenciador de Pacotes UV
### Para Linux/macOS:
```bash
python3.10 -m venv .venv
# Linux/macOS:
source .venv/bin/activate
# Windows:
.venv\Scripts\activate
curl -LsSf https://astral.sh/uv/install.sh | sh
```
### 3️⃣ Instale o pacote
### Para Windows:
```powershell
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
```
## 3️⃣ Crie um Ambiente Virtual
```bash
uv venv
```
### 4️⃣ Instale o pacote
#### Instalação Automática (Recomendada)
@@ -195,7 +202,11 @@ export OPENAI_API_KEY="sua_chave_aqui"
.\start_services.cmd
```
3. Escolha a interface:
3. Ative o ambiente virtual e escolha a interface:
```bash
source .venv/bin/activate
```
- **CLI**
```bash
+54
View File
@@ -0,0 +1,54 @@
[project]
name = "agenticseek"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"adaptive-classifier>=0.0.10",
"aiofiles>=24.1.0",
"anyio>=3.5.0,<5",
"celery>=5.5.1",
"certifi==2025.4.26",
"chromedriver-autoinstaller>=0.6.4",
"colorama>=0.4.6",
"distro>=1.7.0,<2",
"fake-useragent>=2.1.0",
"fastapi>=0.115.12",
"flask>=3.1.0",
"httpx>=0.27,<0.29",
"ipython>=8.13.0",
"jiter>=0.4.0,<1",
"kokoro==0.9.4",
"langid>=1.1.6",
"librosa>=0.10.2.post1",
"markdownify>=1.1.0",
"numpy>=1.24.4",
"ollama>=0.4.7",
"openai>=1.84.0",
"ordered-set>=4.1.0",
"playsound3>=1.0.0",
"protobuf>=3.20.3",
"pyaudio>=0.2.14",
"pydantic>=2.10.6",
"pydantic-core>=2.27.2",
"pypdf>=5.4.0",
"pypinyin>=0.54.0",
"python-dotenv>=1.0.0",
"requests>=2.31.0",
"sacremoses>=0.0.53",
"scipy>=1.9.3",
"selenium>=4.27.1",
"selenium-stealth>=1.0.6",
"sentencepiece>=0.2.0",
"setuptools>=75.6.0",
"sniffio>=1.3.1",
"soundfile>=0.13.1",
"termcolor>=2.4.0",
"text2emotion>=0.0.5",
"torch>=2.4.1",
"tqdm>4",
"transformers>=4.46.3",
"undetected-chromedriver>=3.5.5",
"uvicorn>=0.34.0",
]
+1 -1
View File
@@ -13,7 +13,7 @@ requests>=2.31.0
numpy>=1.24.4
colorama>=0.4.6
python-dotenv>=1.0.0
playsound>=1.3.0
playsound3>=1.0.0
soundfile>=0.13.1
transformers>=4.46.3
torch>=2.4.1
+27 -20
View File
@@ -4,25 +4,18 @@ echo "Starting installation for Linux..."
set -e
if ! command -v python3.10 &> /dev/null; then
echo "Error: Python 3.10 is not installed. Please install Python 3.10 and try again."
echo "You can install it using: sudo apt-get install python3.10 python3.10-dev python3.10-venv"
# Check if uv is installed
if ! command -v uv &> /dev/null; then
echo "Error: uv is not installed. Please install uv first."
echo "You can install it using: curl -LsSf https://astral.sh/uv/install.sh | sh"
exit 1
fi
# Check if pip3.10 is available
if ! python3.10 -m pip --version &> /dev/null; then
echo "Error: pip for Python 3.10 is not installed. Installing python3.10-pip..."
sudo apt-get install -y python3.10-pip || { echo "Failed to install python3.10-pip"; exit 1; }
fi
# Update package list
sudo apt-get update || { echo "Failed to update package list"; exit 1; }
# make sure essential tool are installed
sudo apt-get install -y \
python3-dev \
python3-pip \
python3-wheel \
build-essential \
alsa-utils \
portaudio19-dev \
@@ -33,15 +26,29 @@ sudo apt-get install -y \
libnss3 \
libxss1 || { echo "Failed to install packages"; exit 1; }
# Upgrade pip for Python 3.10
python3.10 -m pip install --upgrade pip || { echo "Failed to upgrade pip"; exit 1; }
# Install and upgrade setuptools and wheel
python3.10 -m pip install --upgrade setuptools wheel || { echo "Failed to install setuptools and wheel"; exit 1; }
# Install Selenium for chromedriver
python3.10 -m pip install selenium || { echo "Failed to install selenium"; exit 1; }
# Install Python dependencies from requirements.txt
python3.10 -m pip install -r requirements.txt --no-cache-dir || { echo "Failed to install requirements.txt"; exit 1; }
# Initialize uv project if pyproject.toml doesn't exist
if [ ! -f "pyproject.toml" ]; then
echo "Initializing uv project..."
uv init --python 3.10 || { echo "Failed to initialize uv project"; exit 1; }
fi
# Sync the project (creates venv and installs dependencies)
echo "Setting up Python environment with uv..."
uv sync --python 3.10 || { echo "Failed to sync uv project"; exit 1; }
# Add specific packages
echo "Adding Selenium..."
uv add selenium || { echo "Failed to add selenium"; exit 1; }
# Add dependencies from requirements.txt if it exists
if [ -f "requirements.txt" ]; then
echo "Adding dependencies from requirements.txt..."
uv add -r requirements.txt || { echo "Failed to add requirements from requirements.txt"; exit 1; }
fi
# install docker compose
sudo apt install -y docker-compose
echo "Installation complete for Linux!"
echo "Installation complete for Linux!"
echo "To activate the environment, run: source .venv/bin/activate"
echo "Or run commands with: uv run <command>"
+26 -18
View File
@@ -4,18 +4,13 @@ echo "Starting installation for macOS..."
set -e
if ! command -v python3.10 &> /dev/null; then
echo "Error: Python 3.10 is not installed. Please install Python 3.10 and try again."
echo "You can install it using: sudo apt-get install python3.10 python3.10-dev python3.10-venv"
# Check if uv is installed
if ! command -v uv &> /dev/null; then
echo "Error: uv is not installed. Please install uv first."
echo "You can install it using: curl -LsSf https://astral.sh/uv/install.sh | sh"
exit 1
fi
# Check if pip3.10 is available
if ! python3.10 -m pip --version &> /dev/null; then
echo "Error: pip for Python 3.10 is not installed. Installing python3.10-pip..."
sudo apt-get install -y python3.10-pip || { echo "Failed to install python3.10-pip"; exit 1; }
fi
# Check if homebrew is installed
if ! command -v brew &> /dev/null; then
echo "Homebrew not found. Installing Homebrew..."
@@ -31,13 +26,26 @@ brew install --cask chromedriver
# Install portaudio for pyAudio using Homebrew
brew install portaudio
# Upgrade pip for Python 3.10
python3.10 -m pip install --upgrade pip || { echo "Failed to upgrade pip"; exit 1; }
# Install and upgrade setuptools and wheel
python3.10 -m pip install --upgrade setuptools wheel || { echo "Failed to install setuptools and wheel"; exit 1; }
# Install Selenium for chromedriver
python3.10 -m pip install selenium || { echo "Failed to install selenium"; exit 1; }
# Install Python dependencies from requirements.txt
python3.10 -m pip install -r requirements.txt --no-cache-dir || { echo "Failed to install requirements.txt"; exit 1; }
# Initialize uv project if pyproject.toml doesn't exist
if [ ! -f "pyproject.toml" ]; then
echo "Initializing uv project..."
uv init --python 3.10 || { echo "Failed to initialize uv project"; exit 1; }
fi
echo "Installation complete for macOS!"
# Sync the project (creates venv and installs dependencies)
echo "Setting up Python environment with uv..."
uv sync --python 3.10 || { echo "Failed to sync uv project"; exit 1; }
# Add specific packages
echo "Adding Selenium..."
uv add selenium || { echo "Failed to add selenium"; exit 1; }
# Add dependencies from requirements.txt if it exists
if [ -f "requirements.txt" ]; then
echo "Adding dependencies from requirements.txt..."
uv add -r requirements.txt || { echo "Failed to add requirements from requirements.txt"; exit 1; }
fi
echo "Installation complete for macOS!"
echo "To activate the environment, run: source .venv/bin/activate"
echo "Or run commands with: uv run <command>"
+60 -10
View File
@@ -1,17 +1,67 @@
@echo off
echo Starting installation for Windows...
REM Install Python dependencies from requirements.txt
pip install pyreadline3
pip install -r requirements.txt
REM Check if uv is installed
uv --version >nul 2>&1
if %errorlevel% neq 0 (
echo Error: uv is not installed. Please install uv first.
echo You can install it using: powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
pause
exit /b 1
)
REM Install Selenium
pip install selenium
REM Initialize uv project if pyproject.toml doesn't exist
if not exist "pyproject.toml" (
echo Initializing uv project...
uv init --python 3.10
if %errorlevel% neq 0 (
echo Failed to initialize uv project
pause
exit /b 1
)
)
REM Sync the project (creates venv and installs dependencies)
echo Setting up Python environment with uv...
uv sync --python 3.10
if %errorlevel% neq 0 (
echo Failed to sync uv project
pause
exit /b 1
)
REM Add specific packages
echo Adding pyreadline3...
uv add pyreadline3
if %errorlevel% neq 0 (
echo Failed to add pyreadline3
pause
exit /b 1
)
echo Adding Selenium...
uv add selenium
if %errorlevel% neq 0 (
echo Failed to add selenium
pause
exit /b 1
)
REM Add dependencies from requirements.txt if it exists
if exist "requirements.txt" (
echo Adding dependencies from requirements.txt...
uv add -r requirements.txt
if %errorlevel% neq 0 (
echo Warning: Some packages from requirements.txt failed to install.
)
)
echo Installation complete for Windows!
echo To activate the environment, run: .venv\Scripts\activate
echo Or run commands with: uv run ^<command^>
echo.
echo Note: pyAudio installation may require additional steps on Windows.
echo Please install portaudio manually (e.g., via vcpkg or prebuilt binaries) and then run: pip install pyaudio
echo Also, download and install chromedriver manually from: https://sites.google.com/chromium.org/driver/getting-started
echo Place chromedriver in a directory included in your PATH.
echo Installation partially complete for Windows. Follow manual steps above.
echo If pyAudio fails to install, please install portaudio manually and try again.
echo Also, chromedriver-autoinstaller should handle chromedriver automatically.
echo If needed, download chromedriver manually from: https://sites.google.com/chromium.org/driver/getting-started
pause
Generated
+3649
View File
File diff suppressed because it is too large Load Diff