Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
e75bcf67
Unverified
Commit
e75bcf67
authored
Nov 24, 2025
by
Graham King
Committed by
GitHub
Nov 24, 2025
Browse files
fix(dynamo-run): Run without etcd/nats, HTTP port to 8000 (#4555)
Signed-off-by:
Graham King
<
grahamk@nvidia.com
>
parent
f0ca16f0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
21 deletions
+43
-21
launch/dynamo-run/src/flags.rs
launch/dynamo-run/src/flags.rs
+1
-1
launch/dynamo-run/src/lib.rs
launch/dynamo-run/src/lib.rs
+29
-11
launch/dynamo-run/src/main.rs
launch/dynamo-run/src/main.rs
+1
-9
lib/runtime/src/distributed.rs
lib/runtime/src/distributed.rs
+12
-0
No files found.
launch/dynamo-run/src/flags.rs
View file @
e75bcf67
...
...
@@ -31,7 +31,7 @@ pub struct Flags {
/// HTTP port. `in=http` only
/// If tls_cert_path and tls_key_path are provided, this will be TLS/HTTPS.
#[arg(long,
default_value
=
"80
8
0"
)]
#[arg(long,
default_value
=
"80
0
0"
)]
pub
http_port
:
u16
,
/// TLS certificate file
...
...
launch/dynamo-run/src/lib.rs
View file @
e75bcf67
...
...
@@ -77,17 +77,23 @@ pub async fn run(
if
let
Input
::
Endpoint
(
path
)
=
&
in_opt
{
builder
.endpoint_id
(
Some
(
path
.parse
()
.with_context
(||
path
.clone
())
?
));
}
let
selected_store
:
KeyValueStoreSelect
=
flags
.store_kv
.parse
()
?
;
let
request_plane
:
RequestPlaneMode
=
flags
.request_plane
.parse
()
?
;
let
dst_config
=
DistributedConfig
{
store_backend
:
selected_store
,
// We only need NATS here to monitor it's metrics, so only if it's our request plane.
nats_config
:
if
request_plane
.is_nats
()
{
Some
(
nats
::
ClientOptions
::
default
())
}
else
{
None
},
request_plane
,
let
dst_config
=
if
is_process_local
(
&
in_opt
,
&
out_opt
)
{
// We are both the frontend and backend, no networking
DistributedConfig
::
process_local
()
}
else
{
// Normal case
let
selected_store
:
KeyValueStoreSelect
=
flags
.store_kv
.parse
()
?
;
let
request_plane
:
RequestPlaneMode
=
flags
.request_plane
.parse
()
?
;
DistributedConfig
{
store_backend
:
selected_store
,
// We only need NATS here to monitor it's metrics, so only if it's our request plane.
nats_config
:
if
request_plane
.is_nats
()
{
Some
(
nats
::
ClientOptions
::
default
())
}
else
{
None
},
request_plane
,
}
};
let
distributed_runtime
=
DistributedRuntime
::
new
(
runtime
.clone
(),
dst_config
)
.await
?
;
let
local_model
=
builder
.build
()
.await
?
;
...
...
@@ -117,6 +123,18 @@ pub async fn run(
Ok
(())
}
pub
fn
is_in_dynamic
(
in_opt
:
&
Input
)
->
bool
{
matches!
(
in_opt
,
Input
::
Endpoint
(
_
))
}
pub
fn
is_out_dynamic
(
out_opt
:
&
Option
<
Output
>
)
->
bool
{
matches!
(
out_opt
,
Some
(
Output
::
Auto
))
}
fn
is_process_local
(
in_opt
:
&
Input
,
out_opt
:
&
Option
<
Output
>
)
->
bool
{
!
is_in_dynamic
(
in_opt
)
&&
!
is_out_dynamic
(
out_opt
)
}
/// Create the engine matching `out_opt`
/// Note validation happens in Flags::validate. In here assume everything is going to work.
async
fn
engine_for
(
...
...
launch/dynamo-run/src/main.rs
View file @
e75bcf67
...
...
@@ -127,17 +127,9 @@ async fn wrapper(runtime: dynamo_runtime::Runtime) -> anyhow::Result<()> {
.chain
(
env
::
args
()
.skip
(
non_flag_params
)),
)
?
;
if
is_in_dynamic
(
&
in_opt
)
&&
is_out_dynamic
(
&
out_opt
)
{
if
dynamo_run
::
is_in_dynamic
(
&
in_opt
)
&&
dynamo_run
::
is_out_dynamic
(
&
out_opt
)
{
anyhow
::
bail!
(
"Cannot use endpoint for both in and out"
);
}
dynamo_run
::
run
(
runtime
,
in_opt
,
out_opt
,
flags
)
.await
}
fn
is_in_dynamic
(
in_opt
:
&
Input
)
->
bool
{
matches!
(
in_opt
,
Input
::
Endpoint
(
_
))
}
fn
is_out_dynamic
(
out_opt
:
&
Option
<
Output
>
)
->
bool
{
matches!
(
out_opt
,
Some
(
Output
::
Auto
))
}
lib/runtime/src/distributed.rs
View file @
e75bcf67
...
...
@@ -447,6 +447,18 @@ impl DistributedConfig {
request_plane
,
}
}
/// A DistributedConfig that isn't distributed, for when the frontend and backend are in the
/// same process.
pub
fn
process_local
()
->
DistributedConfig
{
DistributedConfig
{
store_backend
:
KeyValueStoreSelect
::
Memory
,
nats_config
:
None
,
// This won't be used in process local, so we likely need a "none" option to
// communicate that and avoid opening the ports.
request_plane
:
RequestPlaneMode
::
Tcp
,
}
}
}
/// Request plane transport mode configuration
...
...
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