Skip to content

Commit 65d0fd6

Browse files
committed
g
1 parent c959a7c commit 65d0fd6

File tree

6 files changed

+23
-4
lines changed

6 files changed

+23
-4
lines changed
0 Bytes
Binary file not shown.
42 Bytes
Binary file not shown.

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM public.ecr.aws/lambda/python:3.8
2+
3+
# Install the function's dependencies using file requirements.txt
4+
# from your project folder.
5+
COPY Backend ./Backend
6+
COPY client ./client
7+
COPY Files ./Files
8+
COPY images ./images
9+
COPY Local_Storage ./Local_Storage
10+
11+
COPY requirements.txt .
12+
RUN pip3 install -r requirements.txt --target "${LAMBDA_TASK_ROOT}"
13+
14+
# Copy function code
15+
COPY app.py ${LAMBDA_TASK_ROOT}
16+
17+
# Set the CMD to your handler (could also be done as a parameter override outside of the Dockerfile)
18+
CMD [ "app.handler" ]

__pycache__/main.cpython-310.pyc

56 Bytes
Binary file not shown.

main.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
import uvicorn
22
from fastapi import FastAPI
33
from fastapi.middleware.cors import CORSMiddleware
4-
4+
from mangum import Mangum
55
#from Backend.pyqsorter import router as api1_router
66
#from Backend.summariser import router_summariser as summariser
77
#from Backend.Notes_Analyser import router as api4_router
88
#from Backend.Narrator import router as api5_router
9-
from Backend.NotesToText import router as NotesToText_rounter
9+
from Backend.NotesToText import router as notestotext
1010
# import other API routers as needed
1111

1212
origins = ["*"]
1313

1414

1515
app = FastAPI()
16+
handler=Mangum(app)
1617

1718
# Configure CORS
1819
app.add_middleware(
@@ -33,8 +34,8 @@
3334
# include other API routers as needed
3435

3536
#app.include_router(NotesToText_rounter)
36-
app.include_router(cluster_qns_app)
37+
#app.include_router(api1_router)
3738

3839
if __name__ == "__main__":
39-
uvicorn.run(app, host="192.168.137.193", port=8000)
40+
uvicorn.run(app, host="0.0.0.0", port=8000)
4041

requirements.txt

6.88 KB
Binary file not shown.

0 commit comments

Comments
 (0)