Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: fix subprocess log on linux #357

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions xinference/deploy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ async def create_worker_actor_pool(
) -> "MainActorPoolType":
from xorbits._mars.resource import cuda_count

subprocess_start_method = "forkserver" if os.name != "nt" else "spawn"

cuda_device_indices = []
cuda_visible_devices = os.environ.get("CUDA_VISIBLE_DEVICES")
if cuda_visible_devices:
Expand All @@ -46,6 +48,7 @@ async def create_worker_actor_pool(
n_process=n_process,
labels=labels,
envs=envs,
subprocess_start_method=subprocess_start_method,
logging_conf=logging_conf,
)
return pool
Expand All @@ -64,6 +67,7 @@ async def create_worker_actor_pool(
address=address,
n_process=n_process,
labels=labels,
subprocess_start_method=subprocess_start_method,
logging_conf=logging_conf,
)
return pool