Add auto-installation of gunicorn if not present in environment
This commit is contained in:
parent
ab704aae47
commit
3511b9805c
1 changed files with 6 additions and 0 deletions
|
|
@ -45,6 +45,12 @@ def main():
|
|||
print(f"Workers setting: {args.workers}")
|
||||
print("=" * 80 + "\n")
|
||||
|
||||
# Check and install gunicorn if not present
|
||||
import pipmaster as pm
|
||||
if not pm.is_installed("gunicorn"):
|
||||
print("Installing gunicorn...")
|
||||
pm.install("gunicorn")
|
||||
|
||||
# Import Gunicorn's StandaloneApplication
|
||||
from gunicorn.app.base import BaseApplication
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue