Spaces:
Build error
Build error
Commit ·
fecebcb
1
Parent(s): 929d64b
test: use uvicorn for running app at end of build
Browse filesFiles changed (2)
- Dockerfile+2-1
- app/main.py+5-5
15 unmodified lines1617181915 unmodified linesCOPY app/ app/# runs our application at the start of the docker imageCMD ["python", "app/main.py"]15 unmodified lines161718192015 unmodified linesCOPY app/ app/# runs our application at the start of the docker image# CMD ["python", "app/main.py"]CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
2 unmodified lines345678929 unmodified lines394041424344452 unmodified linesfrom utils import QASearcherapp = FastAPI()@app.post("/set_context")async def set_context(data: Request):29 unmodified linesreturn response# initialises the QA model and starts the uvicorn appif __name__ == "__main__":qa_search = QASearcher()uvicorn.run(app, host="0.0.0.0", port=8000)2 unmodified lines345678929 unmodified lines394041424344452 unmodified linesfrom utils import QASearcherapp = FastAPI()qa_search = QASearcher()@app.post("/set_context")async def set_context(data: Request):29 unmodified linesreturn response# # initialises the QA model and starts the uvicorn app# if __name__ == "__main__":# uvicorn.run(app, host="0.0.0.0", port=8000)
Dockerfile+2-1
app/main.py+5-5