Skip to content

Commit

Permalink
fix: do not use UDS on WSL (#4204)
Browse files Browse the repository at this point in the history
  • Loading branch information
frostming committed Sep 22, 2023
1 parent 2afd911 commit f3a63c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bentoml/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import json
import logging
import os
import platform
import shlex
import shutil
import sys
Expand Down Expand Up @@ -43,6 +44,7 @@

API_SERVER_NAME = "_bento_api_server"
PROMETHEUS_SERVER_NAME = "_prometheus_server"
IS_WSL = "microsoft-standard" in platform.release()


@inject
Expand Down Expand Up @@ -283,7 +285,7 @@ def serve_http_production(
uds_path = None
timeout_args = ["--timeout", str(timeout)] if timeout else []

if psutil.POSIX:
if psutil.POSIX and not IS_WSL:
# use AF_UNIX sockets for Circus
uds_path = tempfile.mkdtemp()
for runner in svc.runners:
Expand Down

0 comments on commit f3a63c4

Please sign in to comment.