This project is a FastAPI-based application designed to receive IMU (Inertial Measurement Unit) data through a POST endpoint and classify falls.
- Create a Virtual Environment: In your project folder, run the following command to create a virtual environment:
python3 -m venv venv-
Activate the Vitual Enviroemnt
- Windows
.\venv\Scripts\activate
- Mac
source venv/bin/activate -
Install dependencies
pip install -r requirements-dev.txt
uvicorn main:app --port 9999for changes to be reflected immediatly use:
uvicorn main:app --reload --port 9999If you want to make the API faster you can utilise multiple CPU cores
uvicorn main:app --host 0.0.0.0 --port 9999 --workers 4Swagger documentation can be found at http://127.0.0.1:8000/docs
You can build the API with the Dockerfile using the command:
docker build -t image-name .After building the image you can run the app in a docker container using the command
docker run -d -p 9999:9999 image-name