Project was tested on Python 3.9+.
Create conda environment:
$ conda create --name cruise-literature python==3.9.12
Activate the environment:
$ source activate cruise-literature
Use pip to install requirements:
(cruise-literature)$ pip install -r requirements.txt
If you have a GPU-enabled device:
(cruise-literature)$ pip install -r requirements-gpu.txt
Checkout the backend
Go into src/cruise_literature/
directory:
(cruise-literature)$ cd src/cruise_literature/
Make migrations and migrate the database
(cruise-literature)$ python manage.py makemigrations home document_search concept_search users
(cruise-literature)$ python manage.py migrate
Create superuser:
(cruise-literature)$ python manage.py createsuperuser
Fill in sample data into the database
(cruise-literature)$ python manage.py loaddata users_data.json
Make sure that Django Desktop application is running.
Finally, run Django server
(cruise-literature)$ python manage.py runserver 8000
Server should be available at http://127.0.0.1:8000/
(cruise-literature)$ python manage.py runserver YOUR_IP:YOUR_PORT
Before you start work, make sure you have the latest changes.
Go into src/cruise_literature/
directory:
> git pull origin main
If you are using a laptop with the M1 chip please change the following line in the settings.py file:
M1_CHIP = True
see #130 for more details