Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
dee80d18
Commit
dee80d18
authored
Apr 10, 2025
by
ishandhanani
Committed by
GitHub
Apr 10, 2025
Browse files
fix: set env vars before worker spawn (#583)
parent
34be4418
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
deploy/dynamo/sdk/src/dynamo/sdk/cli/serve_dynamo.py
deploy/dynamo/sdk/src/dynamo/sdk/cli/serve_dynamo.py
+5
-6
No files found.
deploy/dynamo/sdk/src/dynamo/sdk/cli/serve_dynamo.py
View file @
dee80d18
...
@@ -73,12 +73,7 @@ def main(
...
@@ -73,12 +73,7 @@ def main(
dynamo_context
[
"runner_map"
]
=
runner_map
dynamo_context
[
"runner_map"
]
=
runner_map
dynamo_context
[
"worker_id"
]
=
worker_id
dynamo_context
[
"worker_id"
]
=
worker_id
# Import service first to check configuration
# Ensure environment variables are set before we initialize
service
=
import_service
(
bento_identifier
)
if
service_name
and
service_name
!=
service
.
name
:
service
=
service
.
find_dependent_by_name
(
service_name
)
# Handle worker environment if specified
if
worker_env
:
if
worker_env
:
env_list
:
list
[
dict
[
str
,
t
.
Any
]]
=
json
.
loads
(
worker_env
)
env_list
:
list
[
dict
[
str
,
t
.
Any
]]
=
json
.
loads
(
worker_env
)
if
worker_id
is
not
None
:
if
worker_id
is
not
None
:
...
@@ -90,6 +85,10 @@ def main(
...
@@ -90,6 +85,10 @@ def main(
)
)
os
.
environ
.
update
(
env_list
[
worker_key
])
os
.
environ
.
update
(
env_list
[
worker_key
])
service
=
import_service
(
bento_identifier
)
if
service_name
and
service_name
!=
service
.
name
:
service
=
service
.
find_dependent_by_name
(
service_name
)
configure_server_logging
()
configure_server_logging
()
if
runner_map
:
if
runner_map
:
BentoMLContainer
.
remote_runner_mapping
.
set
(
BentoMLContainer
.
remote_runner_mapping
.
set
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment