- Install
python3.9
from here orbrew install [email protected]
- Install
python3-dev
,libpq-dev
,build-essential
- Go to project folder:
cd /your/path/to/geology-neuro-module
- Setup virtual environment:
python3.9 -m venv venv
- Activate virtual environment:
source venv/bin/activate
- Install required packages:
python -m pip install -r requirements.txt
- Copy docs/golden_CONFIG.cfg in root and rename to
CONFIG.cfg
- Set up values in
CONFIG.cfg
- Deactivate virtual environment:
deactivate
- SQLite comes pre-installed with
python
- In
CONFIG.cfg
,[DATABASE]
section set up:DB_DRIVER = sqlite
DB_HOST = /your/path/to/database.db
- Empty other values
- Go to project folder:
cd /your/path/to/geology-neuro-module
- Activate virtual environment:
source venv/bin/activate
- Init (or upgrade existing) database structure:
alembic upgrade head
- Deactivate virtual environment:
deactivate
- Install PostreSQL from here
- Create empty database with locale =
*.UTF-8
- Set up
[DATABASE]
section inCONFIG.cfg
:DB_DRIVER = postgresql
DB_USER = postgres
(by default)DB_PASS = <password>
DB_HOST = <pg_host>:<pg_port>
DB_NAME = <your_db_name>
- Go to project folder:
cd /your/path/to/geology-neuro-module
- Activate virtual environment:
source venv/bin/activate
- Init (or upgrade existing) database structure:
alembic upgrade head
- Deactivate virtual environment:
deactivate
- Go to project folder
cd /your/path/to/geologyAPI
- Make sure you are in virtual environment:
source venv/bin/activate
- Start HTTP-server:
gunicorn neuroAPI:server