Skip to content

Python web service to train neural networks, predict values and maintain database to store them. To be used in university project.

License

Notifications You must be signed in to change notification settings

omelched/geology-neuro-module

Repository files navigation

Contributor Covenant

geology-neuro-module

How to install

  1. Install python3.9 from here or brew install [email protected]
  2. Install python3-dev, libpq-dev, build-essential
  3. Go to project folder: cd /your/path/to/geology-neuro-module
  4. Setup virtual environment: python3.9 -m venv venv
  5. Activate virtual environment: source venv/bin/activate
  6. Install required packages: python -m pip install -r requirements.txt
  7. Copy docs/golden_CONFIG.cfg in root and rename to CONFIG.cfg
  8. Set up values in CONFIG.cfg
  9. Deactivate virtual environment: deactivate

How to configure DATABASE

SQLite

  • SQLite comes pre-installed with python
  1. In CONFIG.cfg, [DATABASE] section set up:
    1. DB_DRIVER = sqlite
    2. DB_HOST = /your/path/to/database.db
    3. Empty other values
  2. Go to project folder: cd /your/path/to/geology-neuro-module
  3. Activate virtual environment: source venv/bin/activate
  4. Init (or upgrade existing) database structure: alembic upgrade head
  5. Deactivate virtual environment: deactivate

PostgreSQL

  1. Install PostreSQL from here
  2. Create empty database with locale = *.UTF-8
  3. Set up [DATABASE] section in CONFIG.cfg:
    1. DB_DRIVER = postgresql
    2. DB_USER = postgres (by default)
    3. DB_PASS = <password>
    4. DB_HOST = <pg_host>:<pg_port>
    5. DB_NAME = <your_db_name>
  4. Go to project folder: cd /your/path/to/geology-neuro-module
  5. Activate virtual environment: source venv/bin/activate
  6. Init (or upgrade existing) database structure: alembic upgrade head
  7. Deactivate virtual environment: deactivate

How to launch

  1. Go to project folder cd /your/path/to/geologyAPI
  2. Make sure you are in virtual environment: source venv/bin/activate
  3. Start HTTP-server: gunicorn neuroAPI:server

About

Python web service to train neural networks, predict values and maintain database to store them. To be used in university project.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks