Spaces:
Sleeping

File size: 901 Bytes
785484d
 
fb64148
785484d
 
 
 
 
 
 
 
 
cad3790
 
 
fb64148
785484d
fb64148
 
 
 
 
 
 
 
 
785484d
 
cad3790
 
 
 
 
 
ec29540
 
785484d
 
 
ec29540
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"""
server/app.py
OpenEnv-core server with auto-generated UI.
"""

import sys
import os
import uvicorn

# Add project root to path so imports work when run as module
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

# Enable web interface for Gradio UI
os.environ.setdefault("ENABLE_WEB_INTERFACE", "true")

from openenv.core.env_server.http_server import create_app
from env.environment import ISSEnvironment
from env.objects import Action, Observation

app = create_app(
    ISSEnvironment,
    Action,
    Observation,
    env_name="iss-safety-operations",
    max_concurrent_envs=1,
)


# Add root health check (openenv-core only provides /health)
@app.get("/")
def health():
    return {"status": "ok", "environment": "iss-safety-operations", "version": "1.0.0"}


def main():
    uvicorn.run(app, host="0.0.0.0", port=7860)


if __name__ == "__main__":
    main()