File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -7360,6 +7360,15 @@ def main(launch_args, default_args):
73607360 args .admin = False
73617361 print ("\n WARNING: Admin was set without selecting an admin directory. Admin cannot be used.\n " )
73627362
7363+ # Check if admin exists, if not add a default to the directory to allow remote model loading without a config
7364+ if args .admin and args .admindir :
7365+ dirpath = os .path .abspath (args .admindir )
7366+ opts = [f for f in sorted (os .listdir (dirpath )) if (f .endswith (".kcpps" ) or f .endswith (".kcppt" )) and os .path .isfile (os .path .join (dirpath , f ))]
7367+ if len (opts ) == 0 :
7368+ with open (os .path .join (dirpath , "Default.kcpps" ), "w" ) as f :
7369+ f .write ("{}" )
7370+ print ("\n Admin directory was empty, default file generated.\n " )
7371+
73637372 if not args .admin : #run in single process mode
73647373 if args .remotetunnel and not args .prompt and not args .benchmark and not args .cli :
73657374 setuptunnel (global_memory , True if args .sdmodel else False )
You can’t perform that action at this time.
0 commit comments