rwheel commited on
Commit
3c80574
·
1 Parent(s): 5a5b028

Upload 4 files

Browse files
Files changed (4) hide show
  1. Dockerfile +12 -0
  2. app/__init__.py +0 -0
  3. app/main.py +7 -0
  4. requirements.txt +2 -0
Dockerfile ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ FROM python:3.9
3
+
4
+ WORKDIR /code
5
+
6
+ COPY ./requirements.txt /code/requirements.txt
7
+
8
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
9
+
10
+ COPY ./app /code/app
11
+
12
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
app/__init__.py ADDED
File without changes
app/main.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI
2
+
3
+ app = FastAPI()
4
+
5
+ @app.get("/items/{name}")
6
+ async def say_hello(name):
7
+ return {"message": f"Hello {name}!"}
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ fastapi>=0.68.0,<0.69.0
2
+ uvicorn>=0.15.0,<0.16.0