Installation

This guide will help you install and set up PTIIKInsight on your system. Choose between Docker (recommended) or local installation.

System Requirements

  • OS: Windows 10+, macOS 10.14+, or Linux (Ubuntu 18.04+)

  • RAM: 4 GB minimum (8 GB recommended)

  • CPU: 2+ cores

  • Storage: 5 GB free space

  • Python: 3.10(for local installation only)

Installation Methods

Choose one of the two installation methods below:

Docker installation is the quickest and easiest way to get PTIIKInsight running.

Prerequisites

Steps

  1. Clone the repository

    git clone https://github.com/your-org/PTIIKInsight.git
    cd PTIIKInsight/project
  2. Start the services

    docker-compose up -d
  3. Access the application

    • API: http://localhost:8000

    • Dashboard: http://localhost:8501 (requires manual start, see note below)

    • Monitoring: http://localhost:3000 (Grafana - admin/admin)

Note: The current Docker setup only runs the API and monitoring services. To run the dashboard, you'll need to start it manually (see local installation steps below) or add it to the Docker setup.

Option 2: Local Installation

For development or when you prefer to run services individually.

Prerequisites

  • Python 3.10

  • pip (Python package manager)

Steps

  1. Clone the repository

    git clone https://github.com/your-org/PTIIKInsight.git
    cd PTIIKInsight/project
  2. Create a virtual environment

    python -m venv venv
    
    # Activate virtual environment
    # Windows:
    venv\Scripts\activate
    # macOS/Linux:
    source venv/bin/activate
  3. Install dependencies

    # Install API dependencies
    pip install -r requirements.txt
    
    # Install dashboard dependencies
    pip install -r dashboard/requirements.txt
  4. Start the services

    Open separate terminal windows/tabs for each service:

    Terminal 1 - API Server:

    cd project
    uvicorn api.main:app --host 0.0.0.0 --port 8000 --reload

    Terminal 2 - Dashboard:

    cd project
    streamlit run dashboard/main.py --server.port 8501
  5. Access the application

    • API: http://localhost:8000

    • API Documentation: http://localhost:8000/docs

    • Dashboard: http://localhost:8501

Verification

After installation, verify everything is working:

  1. Check API health

    curl http://localhost:8000/health

    Or visit http://localhost:8000/docs in your browser

  2. Check Dashboard Open http://localhost:8501 in your browser

Troubleshooting

Common Issues

Port Already in Use

# Find process using the port
netstat -ano | findstr :8000
# Kill the process (Windows)
taskkill /PID <PID> /F

# Or use different ports
uvicorn api.main:app --port 8001
streamlit run dashboard/main.py --server.port 8502

Python Dependencies Issues

# Upgrade pip
python -m pip install --upgrade pip

# Reinstall requirements
pip install -r requirements.txt --force-reinstall

Docker Issues

# Check Docker is running
docker --version

# Restart Docker containers
docker-compose down
docker-compose up -d

# View logs
docker-compose logs -f

Next Steps

Once installation is complete:

  1. Check the API Reference to explore available endpoints

  2. Visit the Web UI Guide to learn about the dashboard features

  3. See Troubleshooting if you encounter any issues

Last updated