Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- Dockerfile +2 -1
- requirements.txt +2 -0
- server/app.py +9 -0
Dockerfile
CHANGED
|
@@ -9,9 +9,10 @@ COPY requirements.txt /app/requirements.txt
|
|
| 9 |
RUN pip install --no-cache-dir -r /app/requirements.txt
|
| 10 |
|
| 11 |
COPY env /app/env
|
|
|
|
| 12 |
COPY inference.py /app/inference.py
|
| 13 |
COPY openenv.yaml /app/openenv.yaml
|
| 14 |
COPY README.md /app/README.md
|
| 15 |
|
| 16 |
ENV ENABLE_WEB_INTERFACE=true
|
| 17 |
-
CMD ["python", "
|
|
|
|
| 9 |
RUN pip install --no-cache-dir -r /app/requirements.txt
|
| 10 |
|
| 11 |
COPY env /app/env
|
| 12 |
+
COPY server /app/server
|
| 13 |
COPY inference.py /app/inference.py
|
| 14 |
COPY openenv.yaml /app/openenv.yaml
|
| 15 |
COPY README.md /app/README.md
|
| 16 |
|
| 17 |
ENV ENABLE_WEB_INTERFACE=true
|
| 18 |
+
CMD ["python", "-m", "server.app"]
|
requirements.txt
CHANGED
|
@@ -1,2 +1,4 @@
|
|
| 1 |
openai>=1.30.0,<2.0.0
|
| 2 |
pydantic>=2.7.0,<3.0.0
|
|
|
|
|
|
|
|
|
| 1 |
openai>=1.30.0,<2.0.0
|
| 2 |
pydantic>=2.7.0,<3.0.0
|
| 3 |
+
fastapi>=0.110.0,<1.0.0
|
| 4 |
+
uvicorn>=0.30.0,<1.0.0
|
server/app.py
CHANGED
|
@@ -9,6 +9,15 @@ import uvicorn
|
|
| 9 |
app = FastAPI(title="openenv-productivity", version="1.0.0")
|
| 10 |
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
@app.get("/health")
|
| 13 |
def health() -> dict[str, str]:
|
| 14 |
return {"status": "ok"}
|
|
|
|
| 9 |
app = FastAPI(title="openenv-productivity", version="1.0.0")
|
| 10 |
|
| 11 |
|
| 12 |
+
@app.get("/")
|
| 13 |
+
def root() -> dict[str, str]:
|
| 14 |
+
return {
|
| 15 |
+
"status": "ok",
|
| 16 |
+
"service": "openenv-productivity",
|
| 17 |
+
"message": "Server is running. Use /health for health checks.",
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
|
| 21 |
@app.get("/health")
|
| 22 |
def health() -> dict[str, str]:
|
| 23 |
return {"status": "ok"}
|