Sign inSign up

masterhood13/dota2predictor

By masterhood13

•Updated almost 2 years ago

Dota 2 match outcome predictor using machine learning models built with Python.

Image
Machine learning & AI
Data science
0

10K+

masterhood13/dota2predictor repository overview

⁠Dota 2 Predictor

A powerful Dota 2 match outcome predictor leveraging machine learning models built with Python. This container allows you to easily deploy a Telegram bot that predicts match outcomes using live game data, with support for PostgreSQL as the backend database.

⁠Author

Created by masterhood13⁠

⁠How to Use This Container

⁠1. Pull the Docker Image

Pull the pre-built image from Docker Hub:

docker pull masterhood13/dota2predictor
⁠2. Set Up Your Environment Variables

To connect to required services, create a .env file in your local directory with the following content:

OPENDOTA_KEY=your_actual_opendota_api_key
STEAM_API_KEY=your_actual_steam_api_key
TELEGRAM_KEY=your_actual_telegram_bot_token
DB_HOST=postgres_db  # This matches the database service name in Docker Compose
DB_USER=myuser
DB_PASSWORD=mypassword
DB_NAME=mydatabase
⁠3. Run the Container with Docker Compose

For easier management and to run additional services like PostgreSQL alongside the bot, consider using Docker Compose. Here’s an example docker-compose.yml file to get you started:

version: '3.8'

services:
  db:
    image: postgres:17.0
    container_name: postgres_db
    environment:
      POSTGRES_USER: myuser  # Set a username
      POSTGRES_PASSWORD: mypassword  # Set a password
      POSTGRES_DB: mydatabase  # Set a default database name
    ports:
      - "5432:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data

  predictor:
    image: masterhood13/dota2predictor:latest
    container_name: dota2predictor
    environment:
      DB_HOST: postgres_db
    env_file:
      - .env
    depends_on:
      - db

volumes:
  postgres_data:

To start the containers, navigate to your project directory in the terminal and run:

docker-compose up

This command starts both the PostgreSQL database and the Dota 2 predictor bot in separate containers. Once up and running, you can interact with the bot via Telegram.

Tag summary

Content type

Image

Digest

sha256:5ce1d4429…

Size

541.3 MB

Last updated

almost 2 years ago

docker pull masterhood13/dota2predictor