MCPcopy Create free account
hub / github.com/NVlabs/sage / start

Method start

IsaacLab/docker/utils/container_interface.py:96–130  ·  view source on GitHub ↗

Build and start the Docker container using the Docker compose command.

(self)

Source from the content-addressed store, hash-verified

94 return result.returncode == 0
95
96 def start(self):
97 """Build and start the Docker container using the Docker compose command."""
98 print(
99 f"[INFO] Building the docker image and starting the container '{self.container_name}' in the"
100 " background...\n"
101 )
102
103 # build the image for the base profile
104 subprocess.run(
105 [
106 "docker",
107 "compose",
108 "--file",
109 "docker-compose.yaml",
110 "--env-file",
111 ".env.base",
112 "build",
113 "isaac-lab-base",
114 ],
115 check=False,
116 cwd=self.context_dir,
117 env=self.environ,
118 )
119
120 # build the image for the profile
121 subprocess.run(
122 ["docker", "compose"]
123 + self.add_yamls
124 + self.add_profiles
125 + self.add_env_files
126 + ["up", "--detach", "--build", "--remove-orphans"],
127 check=False,
128 cwd=self.context_dir,
129 env=self.environ,
130 )
131
132 def enter(self):
133 """Enter the running container by executing a bash shell.

Callers 4

mainFunction · 0.95
dataset_states_to_obs_mpFunction · 0.45
_startMethod · 0.45
_server_loopMethod · 0.45

Calls 1

runMethod · 0.45

Tested by

no test coverage detected