prashasti commited on
Commit
ad747a5
·
1 Parent(s): f2402e7

Remove ui

Browse files
Files changed (3) hide show
  1. Dockerfile +6 -3
  2. requirements.txt +4 -6
  3. server/app.py +1 -7
Dockerfile CHANGED
@@ -2,14 +2,17 @@ FROM python:3.12-slim
2
 
3
  WORKDIR /app
4
 
5
- COPY requirements.txt .
6
- RUN pip install --no-cache-dir -r requirements.txt
7
  RUN pip install --no-cache-dir uv
8
 
 
9
  COPY . .
10
 
 
11
  RUN uv pip install --system -e ".[dev]"
12
 
 
13
  EXPOSE 8000
14
 
15
- CMD ["python", "-m", "server.app"]
 
 
2
 
3
  WORKDIR /app
4
 
5
+ # install uv (fast dependency manager)
 
6
  RUN pip install --no-cache-dir uv
7
 
8
+ # copy everything
9
  COPY . .
10
 
11
+ # install project from pyproject.toml
12
  RUN uv pip install --system -e ".[dev]"
13
 
14
+ # expose API port (FastAPI default)
15
  EXPOSE 8000
16
 
17
+ # run using your pyproject entrypoint
18
+ CMD ["server"]
requirements.txt CHANGED
@@ -1,8 +1,6 @@
1
- fastapi>=0.110.0
2
- uvicorn>=0.29.0
 
3
  openai>=1.0.0
4
- python-dotenv>=1.0.0
5
  openenv-core>=0.2.0
6
- pydantic>=2.0.0
7
- gradio>=4.0.0
8
- requests>=2.31.0
 
1
+ fastapi==0.110.0
2
+ uvicorn==0.29.0
3
+ pydantic==2.6.4
4
  openai>=1.0.0
 
5
  openenv-core>=0.2.0
6
+ pyyaml>=6.0
 
 
server/app.py CHANGED
@@ -14,8 +14,6 @@ import os
14
  import uvicorn
15
  from fastapi import FastAPI, HTTPException
16
  from pydantic import BaseModel
17
- from ui import build_ui
18
- import gradio as gr
19
 
20
  # Import your environments
21
  from tasks.task_simple import create_env as create_simple
@@ -110,12 +108,8 @@ def state():
110
  except Exception as e:
111
  raise HTTPException(status_code=400, detail=str(e))
112
 
113
- # Mount Gradio UI inside FastAPI
114
- ui = build_ui()
115
- app = gr.mount_gradio_app(app, ui, path="/ui")
116
-
117
  def main():
118
- port = int(os.getenv("PORT", 8000))
119
  uvicorn.run(app, host="0.0.0.0", port=port)
120
 
121
 
 
14
  import uvicorn
15
  from fastapi import FastAPI, HTTPException
16
  from pydantic import BaseModel
 
 
17
 
18
  # Import your environments
19
  from tasks.task_simple import create_env as create_simple
 
108
  except Exception as e:
109
  raise HTTPException(status_code=400, detail=str(e))
110
 
 
 
 
 
111
  def main():
112
+ port = int(os.getenv("PORT", 7860))
113
  uvicorn.run(app, host="0.0.0.0", port=port)
114
 
115