- Create a file named
.flaskenv
in the root directory, put the following content in it:FLASK_APP=cctv.py FLASK_ENV=development FLASK_DEBUG=1 AWS_ACCESS_KEY_ID=<your AWS access key> AWS_SECRET_ACCESS_KEY=<your AWS secret access key> BUCKET_NAME=<your bucket name>
- Install requirements (or create a virtual environment beforehand), e.g.:
pip install -r requirements.txt
- Get the model here
- Install docker or podman
- Run redis server via docker/podman:
For podman, follow instructions here
docker run -d -p 6379:6379 redis
- Run redis worker:
rq worker saving-tasks
- Open another terminal, run the inference server:
flask run
- Go to your inference server's URL, e.g.
http://localhost:5000
, follow the instruction there to test the API.
The predicted frame is stored in AWS S3 bucket.
- Store the predicted frames
- Write test
- Connect to cloud bucket storage
- Use redis worker to queue the upload to cloud storage process
- Actually deploy it