@@ -383,7 +383,7 @@ def bench_parser(subparsers):
383
383
"--network-mode" ,
384
384
type = str ,
385
385
default = "none" ,
386
- help = "Set the network mode for the container. " ,
386
+ help = "set the network mode for the container" ,
387
387
)
388
388
parser .add_argument ("MODEL" ) # positional argument
389
389
parser .set_defaults (func = bench_cli )
@@ -611,7 +611,7 @@ def convert_parser(subparsers):
611
611
"--network-mode" ,
612
612
type = str ,
613
613
default = "none" ,
614
- help = "Sets the configuration for network namespaces when handling RUN instructions. " ,
614
+ help = "sets the configuration for network namespaces when handling RUN instructions" ,
615
615
)
616
616
parser .add_argument ("SOURCE" ) # positional argument
617
617
parser .add_argument ("TARGET" ) # positional argument
@@ -737,7 +737,7 @@ def run_parser(subparsers):
737
737
"--network-mode" ,
738
738
type = str ,
739
739
default = "none" ,
740
- help = "Set the network mode for the container. " ,
740
+ help = "set the network mode for the container" ,
741
741
)
742
742
parser .add_argument ("MODEL" ) # positional argument
743
743
parser .add_argument (
@@ -764,11 +764,15 @@ def serve_parser(subparsers):
764
764
parser .add_argument (
765
765
"-p" , "--port" , default = config .get ('port' , "8080" ), help = "port for AI Model server to listen on"
766
766
)
767
+ # --network-mode=bridge lets the container listen on localhost, and is an option that's compatible
768
+ # with podman and docker:
769
+ # https://docs.podman.io/en/latest/markdown/podman-run.1.html#network-mode-net
770
+ # https://docs.docker.com/engine/network/#drivers
767
771
parser .add_argument (
768
772
"--network-mode" ,
769
773
type = str ,
770
774
default = "bridge" ,
771
- help = "Set the network mode for the container. " ,
775
+ help = "set the network mode for the container" ,
772
776
)
773
777
parser .add_argument ("MODEL" ) # positional argument
774
778
parser .set_defaults (func = serve_cli )
0 commit comments