nero7151 commited on
Commit
9e73b82
·
verified ·
1 Parent(s): ea0ef5d

Upload 4 files

Browse files
Files changed (4) hide show
  1. space.zip +3 -0
  2. space/app/main.py +7 -0
  3. space/dockerfile +9 -0
  4. space/requirements.txt +2 -0
space.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:283db35aa3603b256a10193f4abb3fadd846d83a6ae077676087150304e62afa
3
+ size 1157
space/app/main.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI
2
+
3
+ app = FastAPI()
4
+
5
+ @app.get("/")
6
+ def read_root():
7
+ return {"message": "✅ Hello from FastAPI in Docker Space!"}
space/dockerfile ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10
2
+
3
+ WORKDIR /app
4
+
5
+ COPY . /app
6
+
7
+ RUN pip install --no-cache-dir -r requirements.txt
8
+
9
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
space/requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ fastapi
2
+ uvicorn