Skip to content

Installation Guide

This guide will walk you through the process of setting up the Degent Civilization on your system.

Prerequisites

Before you begin, ensure you have the following installed:

  • Python 3.8 or higher
  • Docker and Docker Compose
  • Git
  • A text editor of your choice

Step 1: Clone the Repository

git clone https://github.com/KingJiongEN/DegentCivil.git
cd DegentCivil

Step 2: Set Up Python Environment

It's recommended to use a virtual environment:

python -m venv venv
source venv/bin/activate  # On Windows, use: venv\Scripts\activate
pip install -r requirements.txt

Step 3: Set Up Docker Services

Milvus Setup

  1. Create directories for Milvus:
mkdir milvus
mkdir milvus/db
mkdir milvus/minio
  1. Start Milvus using Docker Compose:
docker-compose -f docker-compose_milvus.yml up -d

Milvus visualization will be available at: - URL: localhost:18000 - Username: minioadmin - Password: minioadmin

Redis Setup

Start Redis using Docker:

docker pull redis
docker run --name my-redis -p 6379:6379 -d redis

For a secured Redis instance:

docker run --name my-redis-secured -p 6379:6379 -d -v ./redis.conf:/usr/local/etc/redis/redis.conf redis redis-server /usr/local/etc/redis/redis.conf

Step 4: Configuration

  1. Create OpenAI configuration:
# Create the config directory if it doesn't exist
mkdir -p config
# Create OAI_CONFIG_LIST file (you'll need to edit this with your API key)
touch config/OAI_CONFIG_LIST
  1. Set up your OpenAI API key:
export OPENAI_API_KEY=your_api_key_here

Step 5: Verify Installation

Run the memory demo to verify your installation:

export PYTHONPATH="{project_path}:$PYTHONPATH"
python -m app.models.memory

Common Issues

Docker Services

If you encounter issues with Docker services:

  1. Ensure Docker daemon is running:
docker info
  1. Check service status:
docker ps
  1. View service logs:
docker logs my-redis
docker-compose -f docker-compose_milvus.yml logs

Python Dependencies

If you encounter Python dependency issues:

  1. Ensure you're using the correct Python version:
python --version
  1. Update pip:
pip install --upgrade pip
  1. Reinstall dependencies:
pip install -r requirements.txt --force-reinstall

Next Steps