Fall 2023 Class At Columbia. Modern Recommendation Systems
must have docker
and docker-compose
installed. You can go to docker's website
to download the latest version of docker
(comes with compose). Once you install it, you'll need to click on the application to run it.
Running the docker app will add docker
and docker-compose
to your PATH so you can run those commands on your terminal
To do everything at once, open up a terminal and run the following command:
docker-compose -f docker-compose.full_db.yaml up --build --force-recreate --renew-anon-volumes
The website will be at http://127.0.0.1:3007/feed
You must wait to see INSTANTIATED to finish to have the ANN index loaded locally, you can comment out before_first_request if you don't need it
If you want to see the API docs, you can go to http://localhost:5004/doc
You can use control-c
to kill the local servers
If you don't want to re-seed the DB, you can:
If you want to do things separately there are 3 commands:
If you're running mac and have HomeBrew installed, then you can run brew install git-lfs
You NEED to download git lfs
. Go to https://git-lfs.github.com/ and download/install git lfs.
Then clone the repo (AFTER you have installed git lfs)
Clone repo
git clone https://github.com/kennethgoodman/Columbia-E4579.git
Then cd into the directory and run git lfs
git lfs install && git lfs pull
The first time to build the database
docker-compose -f docker-compose.full_db.yaml up --build --force-recreate --renew-anon-volumes
Afterwards you can run
docker-compose -f docker-compose.full_db.yaml up
docker-compose down
docker-compose build --no-cache
docker-compose up
If you want to access the database in a mysql CLI, you can run the following command while docker-compose up
is running:
docker-compose exec api-db mysql --password=mysql api_dev
docker-compose exec api python manage.py shell
docker-compose exec api /bin/bash
docker-compose exec api python manage.py recreate_db
docker-compose exec api python manage.py seed_db
Run the scripts/deploy_frontend.sh
docker-compose -f docker-compose.prod.yml up --build
- testdrivenio for a template for docker + flask + react
- Aveek-Saha for their scripts to download movie scripts
- lexica.art for their collection of prompts/images to use as inspiration
- Reddit and all their users for allowing the ability to programmattically download user titles/prompts
- @SamuelSacco for their work on the frontend