Repository: bentoml/BentoML

Issue:
bug: GRPC serving on Windows fails with exception both in production and development mode
### Describe the bug

When I use CLI to serve grpc service

`python -m bentoml serve-grpc <my_service>:svc --reload --enable-reflection --development`

I get an error

```
Error: [bentoml-cli] `serve-grpc` failed: 'grpc' is not supported on Windows without '--development'. The reason being SO_REUSEPORT socket option is only available on UNIX system, and gRPC implementation depends on this behaviour.
```
It looks like this behavior (raising exception) is intended on Windows in production mode, but supposed 
to not raise in development mode.

This command raises both with and without `--development` flag.


### To reproduce

Steps to reproduce bug:
1. Run on Windows `python -m bentoml serve-grpc <any_service>:svc --development --verbose` 

My output:
```
Error: [bentoml-cli] `serve-grpc` failed: 'grpc' is not supported on Windows without '--development'. The reason being SO_REUSEPORT socket option is only available on UNIX system, and gRPC implementation depends on this behaviour.
Traceback (most recent call last):
  File "C:\Users\bzimka\.conda\envs\ort118\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\bzimka\.conda\envs\ort118\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\bzimka\.conda\envs\ort118\lib\site-packages\bentoml\__main__.py", line 4, in <module>
    cli()
  File "C:\Users\bzimka\.conda\envs\ort118\lib\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\bzimka\.conda\envs\ort118\lib\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "C:\Users\bzimka\.conda\envs\ort118\lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\bzimka\.conda\envs\ort118\lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\bzimka\.conda\envs\ort118\lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\bzimka\.conda\envs\ort118\lib\site-packages\bentoml_cli\utils.py", line 367, in wrapper
    raise err from None
  File "C:\Users\bzimka\.conda\envs\ort118\lib\site-packages\bentoml_cli\utils.py", line 362, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\bzimka\.conda\envs\ort118\lib\site-packages\bentoml_cli\utils.py", line 333, in wrapper
    return_value = func(*args, **kwargs)
  File "C:\Users\bzimka\.conda\envs\ort118\lib\site-packages\click\decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "C:\Users\bzimka\.conda\envs\ort118\lib\site-packages\bentoml_cli\utils.py", line 290, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\bzimka\.conda\envs\ort118\lib\site-packages\bentoml_cli\env_manager.py", line 122, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\bzimka\.conda\envs\ort118\lib\site-packages\bentoml_cli\serve.py", line 456, in serve_grpc
    serve_grpc_production(
  File "C:\Users\bzimka\.conda\envs\ort118\lib\site-packages\simple_di\__init__.py", line 139, in _
    return func(*_inject_args(bind.args), **_inject_kwargs(bind.kwargs))
  File "C:\Users\bzimka\.conda\envs\ort118\lib\site-packages\bentoml\serve.py", line 583, in serve_grpc_production
    raise BentoMLException(
bentoml.exceptions.BentoMLException: 'grpc' is not supported on Windows without '--development'. The reason being SO_REUSEPORT socket option is only available on UNIX system, and gRPC implementation depends on this behaviour.
```



### Expected behavior

I expect command to work on Windows with --development flag

### Environment

bentoml: 1.1.9
python: 3.10.13
platform: 'Windows-10-10.0.20348-SP0'



Discussion:

Resolving patch:
diff --git a/src/bentoml/serve.py b/src/bentoml/serve.py
--- a/src/bentoml/serve.py
+++ b/src/bentoml/serve.py
@@ -579,7 +579,7 @@ def serve_grpc_production(
 
     # Check whether users are running --grpc on windows
     # also raising warning if users running on MacOS or FreeBSD
-    if psutil.WINDOWS:
+    if psutil.WINDOWS and (not development_mode):
         raise BentoMLException(
             "'grpc' is not supported on Windows without '--development'. The reason being SO_REUSEPORT socket option is only available on UNIX system, and gRPC implementation depends on this behaviour."
         )


Test patch: