https://github.com/strvcom/ds-academy-api-titanic
Titanic survival model API; using FastAPI, and deployed on Heroku.
https://github.com/strvcom/ds-academy-api-titanic
Last synced: 9 months ago
JSON representation
Titanic survival model API; using FastAPI, and deployed on Heroku.
- Host: GitHub
- URL: https://github.com/strvcom/ds-academy-api-titanic
- Owner: strvcom
- License: bsd-2-clause
- Created: 2022-10-24T09:10:35.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-24T09:51:44.000Z (over 3 years ago)
- Last Synced: 2025-09-07T01:03:50.726Z (9 months ago)
- Language: Jupyter Notebook
- Homepage: https://ds-academy-api-titanic.herokuapp.com/docs
- Size: 57.6 KB
- Stars: 0
- Watchers: 6
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## :rocket: ds-academy-api-titanic
Titanic survival model API.
Written in [FastAPI](https://fastapi.tiangolo.com/).
Deployed on [Heroku](https://www.heroku.com/).
## :pencil: Authors
- [Jaroslav Bezdek](https://www.github.com/jardabezdek)
- [Jan Maly](https://github.com/honzaMaly)
## :construction_worker_man: 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](https://www.docker.com/products/docker-desktop/) installed
on our system.
1. In project root directory, build the docker image
`docker build -t ds-academy-api-titanic:latest .`
1. Run the docker container with web server running inside:
`docker run -i -e "PORT=8000" -p 8000:8000 ds-academy-api-titanic:latest`
1. 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.
1. Create your user profile on [Heroku](https://www.heroku.com).
1. [Install Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) and
log in to your Heroku account: `heroku login`.
1. [Create the app on Heroku](https://devcenter.heroku.com/articles/creating-apps).
1. Set stack for the project to container: `heroku stack:set container -a=`.
1. [Integrate the app with GitHub for auto-deployments](https://devcenter.heroku.com/articles/github-integration).