Georg commited on
Commit
14eec7b
·
1 Parent(s): c1ce8c4

Prepare HF Space deployment

Browse files
Files changed (3) hide show
  1. Dockerfile +4 -1
  2. README.md +8 -0
  3. mujoco_server.py +2 -1
Dockerfile CHANGED
@@ -36,8 +36,11 @@ ENV PYOPENGL_PLATFORM=osmesa
36
  ENV OMP_NUM_THREADS=4
37
  ENV MKL_NUM_THREADS=4
38
 
 
 
 
39
  # Expose port
40
- EXPOSE 5001
41
 
42
  # Run the server
43
  CMD ["python", "mujoco_server.py"]
 
36
  ENV OMP_NUM_THREADS=4
37
  ENV MKL_NUM_THREADS=4
38
 
39
+ # Hugging Face Spaces expects the app to bind to PORT (default 7860)
40
+ ENV PORT=7860
41
+
42
  # Expose port
43
+ EXPOSE 7860
44
 
45
  # Run the server
46
  CMD ["python", "mujoco_server.py"]
README.md CHANGED
@@ -1,3 +1,11 @@
 
 
 
 
 
 
 
 
1
  # Nova Sim
2
 
3
  A unified MuJoCo-based robot simulation platform with web interface for multiple robot types.
 
1
+ ---
2
+ title: Nova Sim
3
+ colorFrom: yellow
4
+ colorTo: green
5
+ sdk: docker
6
+ app_port: 7860
7
+ ---
8
+
9
  # Nova Sim
10
 
11
  A unified MuJoCo-based robot simulation platform with web interface for multiple robot types.
mujoco_server.py CHANGED
@@ -2474,4 +2474,5 @@ def home_blocking():
2474
 
2475
 
2476
  if __name__ == '__main__':
2477
- app.run(host='0.0.0.0', port=3004, debug=False, threaded=True)
 
 
2474
 
2475
 
2476
  if __name__ == '__main__':
2477
+ port = int(os.environ.get("PORT", "3004"))
2478
+ app.run(host='0.0.0.0', port=port, debug=False, threaded=True)