FastAPI Server for Super Resolution Model.
- Build FastAPI Docker Image
git clone https://github.com/ainize-team/SR-FastAPI
cd SR-FastAPI
docker build -t sr-fastapi .
- Run Docker Image
docker run -d --name <server_container_name> -p 8000:8000 \
-e APP_NAME=<server_app_name> \
-e BROKER_URI=<broker_uri> \
-e FIREBASE_APP_NAME=<firebase_app_name> \
-e DATABASE_URL=<firebase_realtime_database_url> \
-e STORAGE_BUCKET=<firebase_storage_url> \
-v <firebase_credential_path>:/app/key \
sr-fastapi
Or, you can use the .env file to run as follows.
docker run -d --name <server_container_name> -p 8000:8000 \
--env-file <env filename> \
-v <firebase_credential_path>:/app/key \
sr-fastapi
- install dev package.
poetry install
- install pre-commit.
pre-commit install