tanaymitra98 commited on
Commit
9af28b4
·
1 Parent(s): 00fe64d

Fix multi-mode deployment structure: move app.py to server, add uv.lock and entry point

Browse files
Files changed (5) hide show
  1. Dockerfile +1 -1
  2. pyproject.toml +6 -2
  3. requirements.txt +1 -0
  4. app.py → server/app.py +8 -0
  5. uv.lock +0 -0
Dockerfile CHANGED
@@ -11,4 +11,4 @@ ENV PYTHONUNBUFFERED=1
11
 
12
  EXPOSE 7860
13
 
14
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
11
 
12
  EXPOSE 7860
13
 
14
+ CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]
pyproject.toml CHANGED
@@ -16,8 +16,12 @@ dependencies = [
16
  "fastapi>=0.110.0",
17
  "openai>=1.30.0",
18
  "pydantic>=2.0.0",
19
- "uvicorn>=0.27.0"
 
20
  ]
21
 
 
 
 
22
  [tool.hatch.build.targets.wheel]
23
- packages = ["."]
 
16
  "fastapi>=0.110.0",
17
  "openai>=1.30.0",
18
  "pydantic>=2.0.0",
19
+ "uvicorn>=0.27.0",
20
+ "openenv-core>=0.2.0"
21
  ]
22
 
23
+ [project.scripts]
24
+ server = "server.app:main"
25
+
26
  [tool.hatch.build.targets.wheel]
27
+ packages = ["server"]
requirements.txt CHANGED
@@ -2,3 +2,4 @@ fastapi>=0.110.0
2
  openai>=1.30.0
3
  pydantic>=2.0.0
4
  uvicorn>=0.27.0
 
 
2
  openai>=1.30.0
3
  pydantic>=2.0.0
4
  uvicorn>=0.27.0
5
+ openenv-core>=0.2.0
app.py → server/app.py RENAMED
@@ -692,3 +692,11 @@ def _get_exploit_scenarios(source_code: str, task_id: str) -> List[Dict[str, str
692
  })
693
 
694
  return scenarios
 
 
 
 
 
 
 
 
 
692
  })
693
 
694
  return scenarios
695
+
696
+ def main():
697
+ import uvicorn
698
+ uvicorn.run("server.app:app", host="0.0.0.0", port=7860)
699
+
700
+ if __name__ == "__main__":
701
+ main()
702
+
uv.lock ADDED
The diff for this file is too large to render. See raw diff