Skip to content

[Bug]: dstack server fails to start with smg_grpc_proto RuntimeError with grpcio<1.81 #3957

@r4victor

Description

@r4victor

Steps to reproduce

  1. Install dstack in a fresh environment with any grpcio version <1.81:
uv pip install 'grpcio<1.81'
uv pip install 'dstack[all]==0.20.24' --refresh
  1. dstack server fails with RuntimeError: The grpc package installed is at version 1.80.0, but the generated code in mlx_engine_pb2_grpc.py depends on grpcio>=1.81.0.

Apparently smg_grpc_proto works only with the latest grpcio==1.81.0 version.

Actual behaviour

No response

Expected behaviour

Figure out if older grpcio versions can be supported. If not, specify grpcio>=1.81.0.

dstack version

master

Server logs

File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/dstack/_internal/server/services/runs/router_worker_sync.py", line 17, in <module>
    from smg_grpc_proto import (
  File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/smg_grpc_proto/__init__.py", line 10, in <module>
    from smg_grpc_proto.generated import (
  File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/smg_grpc_proto/generated/mlx_engine_pb2_grpc.py", line 21, in <module>
    raise RuntimeError(
RuntimeError: The grpc package installed is at version 1.80.0, but the generated code in mlx_engine_pb2_grpc.py depends on grpcio>=1.81.0. Please upgrade your grpc module to grpcio>=1.81.0 or downgrade your generated code using grpcio-tools<=1.80.0.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions