File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 19
19
from typing import Optional
20
20
21
21
import click
22
+ from packaging .version import parse
22
23
23
24
_DOCKERFILE_TEMPLATE = """
24
25
FROM python:3.11-slim
@@ -91,7 +92,8 @@ def _get_service_option_by_adk_version(
91
92
memory_uri : Optional [str ],
92
93
) -> str :
93
94
"""Returns service option string based on adk_version."""
94
- if adk_version >= '1.3.0' :
95
+ parsed_version = parse (adk_version )
96
+ if parsed_version >= parse ('1.3.0' ):
95
97
session_option = (
96
98
f'--session_service_uri={ session_uri } ' if session_uri else ''
97
99
)
@@ -100,7 +102,7 @@ def _get_service_option_by_adk_version(
100
102
)
101
103
memory_option = f'--memory_service_uri={ memory_uri } ' if memory_uri else ''
102
104
return f'{ session_option } { artifact_option } { memory_option } '
103
- elif adk_version >= '1.2.0' :
105
+ elif parsed_version >= parse ( '1.2.0' ) :
104
106
session_option = f'--session_db_url={ session_uri } ' if session_uri else ''
105
107
artifact_option = (
106
108
f'--artifact_storage_uri={ artifact_uri } ' if artifact_uri else ''
You can’t perform that action at this time.
0 commit comments