Skip to content

Latest commit

 

History

History
61 lines (34 loc) · 1.64 KB

DevelopmentNotes.md

File metadata and controls

61 lines (34 loc) · 1.64 KB

Local Dev/Env Setup

Run using:

python3 app.py

Setup:

# Initial env creation
conda env create -f environment.yml

# Use env
conda activate flask-digit-identifier

# update env (e.g. after updating deps?)
conda env update --file environment.yml --prune

Note that you can also create a conda env using a requirements.txt file:

conda create --name flask-digit-identifier --file requirements.txt

Running on Heroku

After installing new packages, make sure to update requirements.txt:

pip freeze > requirements.txt

The Procfile contains the command needed to run the app:

web: gunicorn app:app --log-file -

Install Heroku:

Next, we will need to setup our app on Heroku:

References:

Running on CoCalc

  • Running server via terminal: https://doc.cocalc.com/howto/webserver.html
  • Command: gunicorn -b 0.0.0.0:5000 app:app --log-file -
  • Then access at: https://cocalc.com/<project_id>/server/5000/
  • NOTE: Replace <project_id> with your project ID, e.g. https://cocalc.com/cfca8905-cec9-4b44-b37e-33f41dcc8068/server/5000/. You can get this from the URL when browsing the project in cocalc.