Spaces:
Sleeping
Sleeping
Commit
·
da572dc
1
Parent(s):
1f21b17
uvicorn changes
Browse files- Dockerfile +2 -1
- requirements.txt +1 -1
- wsgi.py +7 -0
Dockerfile
CHANGED
|
@@ -12,4 +12,5 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
| 12 |
|
| 13 |
COPY . .
|
| 14 |
|
| 15 |
-
|
|
|
|
|
|
| 12 |
|
| 13 |
COPY . .
|
| 14 |
|
| 15 |
+
# Start Uvicorn using the wsgi.py entry point
|
| 16 |
+
CMD ["python", "wsgi.py"]
|
requirements.txt
CHANGED
|
@@ -3,4 +3,4 @@ Werkzeug>=2.3.7
|
|
| 3 |
numpy>=1.25.0
|
| 4 |
Pillow>=10.0.0
|
| 5 |
scipy>=1.10.1
|
| 6 |
-
|
|
|
|
| 3 |
numpy>=1.25.0
|
| 4 |
Pillow>=10.0.0
|
| 5 |
scipy>=1.10.1
|
| 6 |
+
uvicorn>=0.23.0
|
wsgi.py
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from app import app
|
| 2 |
+
|
| 3 |
+
if __name__ == "__main__":
|
| 4 |
+
# This block will be executed when running this file directly
|
| 5 |
+
# Useful for local development with: python wsgi.py
|
| 6 |
+
import uvicorn
|
| 7 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|