Interact ML DB Local Setup
- Download docker and table plus
- Pull interact-ml main branch to the latest commit
- create a .env file in the repo directory and paste this
DB_HOST = "localhost"
DB_PORT = 5432
DB_NAME = "postgres"
DB_USER = "postgres"
DB_PASS = "pgpass"
SSL_MODE = 'disable'
PORT = 3030
BACKEND_URL = "http://localhost:8000"
ML_URL = "http://localhost:3030"
LOGGER_URL = "http://localhost:8080"
LOGGER_SECRET = "-"
LOGGER_TOKEN = "-"
POPULATE = "FALSE"- Steps to run DB on docker and python locally (recommended)
- Change POPULATE = "TRUE" (in .env file) if u want to populate dummies
- Run the following commands
- pip install -r requirements.txt
- chmod +x ./build-container.sh
- ./build-container.sh -build
- python3 api.py
- Steps to run both api and DB on docker
- First Uncomment ml-api section in dev.docker-compose.yml file
- Change DB_HOST = "postgres-ml-db" (in .env file)
- Run the following commands
- chmod +x ./build-container.sh
- ./build-container.sh -build (run ./build-container.sh -build -populate -> if u want to populate dummies)
Once setup just run your docker compose (either only db or both db and api) with the command: ./build-container.sh