Git Product home page Git Product logo

columbia-e4579's Introduction

Columbia-E4579

Fall 2023 Class At Columbia. Modern Recommendation Systems

Setup

Install Docker

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

Build, Create DB, Seed DB and Run:

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:

Running With Engagement Dump (Takes Longer)

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

Bring Down Containers

docker-compose down

Build containers (without a cache)

docker-compose build --no-cache

Bring up the containers

docker-compose up

Access the dev database

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

Misc Commands

Access a python shell instantiated with the app env

docker-compose exec api python manage.py shell

Accessing terminal of api backend

docker-compose exec api /bin/bash

Recreating DB

docker-compose exec api python manage.py recreate_db

Seed DB

docker-compose exec api python manage.py seed_db

Deploy To AWS

Build Frontend

Run the scripts/deploy_frontend.sh

Docker EC2
docker-compose -f docker-compose.prod.yml up --build

Thanks

  1. testdrivenio for a template for docker + flask + react
  2. Aveek-Saha for their scripts to download movie scripts
  3. lexica.art for their collection of prompts/images to use as inspiration
  4. Reddit and all their users for allowing the ability to programmattically download user titles/prompts
  5. @SamuelSacco for their work on the frontend

columbia-e4579's People

Contributors

kennethgoodman avatar dugarm avatar chuyangxiao avatar samuelsacco avatar hywvivi98 avatar terence1997 avatar pochl avatar monicaguntur avatar angihe93 avatar katherine-mao avatar flyx7kazami avatar qzy1228 avatar shardaya avatar allenjshi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.