AE-Shree commited on
Commit
70b313b
·
1 Parent(s): bf9c83a

Bhagavan mera madad karo 🙏

Browse files
Files changed (3) hide show
  1. Dockerfile +4 -1
  2. inference.py +5 -0
  3. openenv.yaml +6 -0
Dockerfile CHANGED
@@ -6,8 +6,11 @@ COPY backend/requirements.txt .
6
  RUN pip install uv && uv pip install --system --no-cache -r requirements.txt
7
 
8
  COPY backend/ /app/backend/
 
9
  COPY models.py /app/models.py
 
 
10
 
11
  EXPOSE 7860
12
 
13
- CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
6
  RUN pip install uv && uv pip install --system --no-cache -r requirements.txt
7
 
8
  COPY backend/ /app/backend/
9
+ COPY server/ /app/server/
10
  COPY models.py /app/models.py
11
+ COPY inference.py /app/inference.py
12
+ COPY openenv.yaml /app/openenv.yaml
13
 
14
  EXPOSE 7860
15
 
16
+ CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]
inference.py CHANGED
@@ -37,6 +37,11 @@ def log_end(success: bool, steps: int, score: float, rewards: List[float]) -> No
37
 
38
 
39
  def main():
 
 
 
 
 
40
  # Initialize client using ONLY the validator-provided proxy credentials
41
  client = OpenAI(
42
  base_url=API_BASE_URL,
 
37
 
38
 
39
  def main():
40
+ if not API_BASE_URL or not API_KEY:
41
+ print("[ERROR] API_BASE_URL or API_KEY not set. Cannot proceed.", flush=True)
42
+ log_end(success=False, steps=0, score=0.0, rewards=[])
43
+ return
44
+
45
  # Initialize client using ONLY the validator-provided proxy credentials
46
  client = OpenAI(
47
  base_url=API_BASE_URL,
openenv.yaml CHANGED
@@ -6,6 +6,12 @@ app: server.app:app
6
  port: 7860
7
  description: Cognitive Load Manager (CLM) simulates human cognitive load (energy, stress, fatigue) while managing tasks with deadlines.
8
  version: "1.0.0"
 
 
 
 
 
 
9
  schema:
10
  observation:
11
  type: object
 
6
  port: 7860
7
  description: Cognitive Load Manager (CLM) simulates human cognitive load (energy, stress, fatigue) while managing tasks with deadlines.
8
  version: "1.0.0"
9
+
10
+ endpoints:
11
+ health: /
12
+ reset: /reset
13
+ step: /step
14
+ state: /state
15
  schema:
16
  observation:
17
  type: object