Skip to content

strvcom/ds-academy-api-titanic

Repository files navigation

🚀 ds-academy-api-titanic

Titanic survival model API. Written in FastAPI. Deployed on Heroku.

📝 Authors

👷‍♂️ Setup

Local development

  1. Intall requirements from requirements-dev.txt.

The only difference between requirements-dev.txt and requirements.txt is that in requirements-dev.txt there are two extra dependencies: notebook, and streamlit.

Docker for Heroku deployment

Prerequisite for the following steps is to have Docker Desktop installed on our system.

  1. In project root directory, build the docker image docker build -t ds-academy-api-titanic:latest .
  2. Run the docker container with web server running inside: docker run -i -e "PORT=8000" -p 8000:8000 ds-academy-api-titanic:latest
  3. In logs, you should see a local URL address with running API.

Deployment to Heroku

The repository is ready to be deployed to Heroku without any extra hassle. For deployment, follow these steps.

  1. Review the heroku.yml file to see configuration for Heroku.
  2. Create your user profile on Heroku.
  3. Install Heroku CLI and log in to your Heroku account: heroku login.
  4. Create the app on Heroku.
  5. Set stack for the project to container: heroku stack:set container -a=<name of the app>.
  6. Integrate the app with GitHub for auto-deployments.

About

Titanic survival model API; using FastAPI, and deployed on Heroku.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published