Details
- The backend was built with the Quart framework
- Quart is an asyncio reimplementation of Flask
- All HTTP requests are handled in
app.py
in the root folder - Azure Storage API calls are handled in the `azure_storage_api/azure_Storage_api.py
- Inference results from model endpoint are directly handled in
model_inference/inference.py
When you are developping, you can run the program while in the devcontainer by using this command:
hypercorn -b :8080 app:app
If you want to run the program as a Docker container (e.g., for production), use:
docker build -t nachet-backend .
docker run -p 8080:8080 -v $(pwd):/app nachet-backend
To test the program, use this command:
python -m unittest discover -s tests
Start by making a copy of .env.template
and renaming it .env
. For the backend to function, you will need to add the missing values:
- NACHET_AZURE_STORAGE_CONNECTION_STRING: Connection string to access external storage (Azure Blob Storage).
- NACHET_MODEL_ENDPOINT_REST_URL: Endpoint to communicate with deployed model for inferencing.
- NACHET_MODEL_ENDPOINT_ACCESS_KEY: Key used when consuming online endpoint.
- NACHET_DATA: Url to access nachet-data repository
- NACHET_HEALTH_MESSAGE: Health check message for the server.
If you need help deploying Nachet for your own needs, please contact us at [email protected].