Spaces:
Build error
Build error
Commit
·
0d706cb
1
Parent(s):
aa1b5d0
build: change startup process
Browse files- Dockerfile +1 -1
- main.py → app.py +1 -1
Dockerfile
CHANGED
|
@@ -11,6 +11,6 @@ WORKDIR /
|
|
| 11 |
RUN pip install --no-cache-dir --upgrade -r /requirements.txt
|
| 12 |
|
| 13 |
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
| 14 |
-
CMD ["uvicorn", "
|
| 15 |
|
| 16 |
EXPOSE 7860
|
|
|
|
| 11 |
RUN pip install --no-cache-dir --upgrade -r /requirements.txt
|
| 12 |
|
| 13 |
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
| 14 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
| 15 |
|
| 16 |
EXPOSE 7860
|
main.py → app.py
RENAMED
|
@@ -77,4 +77,4 @@ async def upload(
|
|
| 77 |
# demo.launch(auth=auth if not IS_DEV else None)
|
| 78 |
|
| 79 |
if __name__=='__main__':
|
| 80 |
-
uvicorn.run('
|
|
|
|
| 77 |
# demo.launch(auth=auth if not IS_DEV else None)
|
| 78 |
|
| 79 |
if __name__=='__main__':
|
| 80 |
+
uvicorn.run('app:app', reload=True)
|