Skip to content

Commit

Permalink
Merge pull request #174 from JdeRobot/bt-studio-docker
Browse files Browse the repository at this point in the history
Bt studio docker
  • Loading branch information
javizqh authored Nov 29, 2024
2 parents 421b03b + 3a53381 commit 0fc2dcb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions manager/manager/launcher/launcher_visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
}
],
"bt_studio": [
{
"type": "module",
"module": "console",
"display": ":1",
"external_port": 1108,
"internal_port": 5901,
},
{
"type": "module",
"width": 1024,
Expand Down
4 changes: 4 additions & 0 deletions manager/manager/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,12 @@ def run_bt_studio_application(self, data):
zip_ref.extractall("/workspace/code")
zip_ref.close()

fds = os.listdir("/dev/pts/")
console_fd = str(max(map(int, fds[:-1])))

self.application_process = subprocess.Popen(
["python3", "/workspace/code/execute_docker.py"],
stdin=open('/dev/pts/' + console_fd, 'r'),
stdout=sys.stdout,
stderr=subprocess.STDOUT,
bufsize=1024,
Expand Down

0 comments on commit 0fc2dcb

Please sign in to comment.