Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
Core: make the default IPC mode for docker to host (#1616)
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrychenhf authored Jul 3, 2023
1 parent fdf3c61 commit 1eebf17
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ def run_init(self, *, as_head: bool, file_mounts: Dict[str, str],
labels=self.docker_config.get("labels"),
port_mappings=self.docker_config.get("port_mappings"),
mounts_mapping=self.docker_config.get("mounts_mapping", True),
ipc_mode=self.docker_config.get("ipc_mode"),
)
self.run_with_retry(
start_command, run_env="host")
Expand Down
6 changes: 3 additions & 3 deletions python/cloudtik/core/_private/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ def _docker_start_cmds(user, image, mounts, data_disks, container_name,
numactl_flag, network_flag
]

if ipc_mode:
ipc_flag = "--ipc={}".format(ipc_mode)
docker_run += [ipc_flag]
# default IPC mode to host
ipc_flag = "--ipc={}".format(ipc_mode if ipc_mode else "host")
docker_run += [ipc_flag]

if cpus:
cpus_flag = "--cpus={}".format(cpus)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ def _start_container(self, node_config, tags):
# make a copy before change it
docker_config = copy.deepcopy(docker_config)
docker_config["mounts_mapping"] = False
docker_config["ipc_mode"] = "private"

port_mappings = node_config.get("port_mappings")
if port_mappings:
Expand Down

0 comments on commit 1eebf17

Please sign in to comment.