Skip to content

lemonade-server fails to start on Linux due to FLM check (NotADirectoryError) #59

@Ploux

Description

@Ploux

Environment

  • OS: Linux (Pop!_OS/Ubuntu)
  • Python: 3.10
  • GPU: Nvidia 5090

Issue

When starting lemonade-server on Linux, it crashes trying to check for FLM models, even though FLM is Windows-only?

Error

INFO:     127.0.0.1:33752 - "GET /api/server-running-status HTTP/1.1" 200 OK
2025-10-08 21:02:51,022 - infinity_arcade.main - INFO - === Server running status endpoint called ===
2025-10-08 21:02:51,023 - infinity_arcade.main - INFO - Checking if lemonade-server is running...
2025-10-08 21:02:51,023 - infinity_arcade.main - INFO - Executing lemonade-server command with args: ['status']
2025-10-08 21:02:51,023 - infinity_arcade.main - INFO - Trying command 1: ['lemonade-server-dev', 'status']
2025-10-08 21:02:51,181 - infinity_arcade.main - INFO - Status output: 'Server is not running'
2025-10-08 21:02:51,181 - infinity_arcade.main - INFO - Server is not running according to status command
2025-10-08 21:02:51,181 - infinity_arcade.main - INFO - Initial running check result: False
2025-10-08 21:02:51,181 - infinity_arcade.main - INFO - Server not running, attempting to start automatically...
2025-10-08 21:02:51,181 - infinity_arcade.main - INFO - Attempting to start lemonade-server...
2025-10-08 21:02:51,191 - infinity_arcade.main - INFO - Executing lemonade-server command with args: ['serve', '--ctx-size', '16384']
2025-10-08 21:02:51,191 - infinity_arcade.main - INFO - Trying command 1: ['lemonade-server-dev', 'serve', '--ctx-size', '16384']
2025-10-08 21:02:52,196 - infinity_arcade.main - ERROR - Server failed immediately. Return code: 1
2025-10-08 21:02:52,196 - infinity_arcade.main - ERROR - Stderr: Traceback (most recent call last):
  File "/home/ruin/.local/bin/lemonade-server-dev", line 8, in <module>
    sys.exit(main())
  File "/home/ruin/.local/lib/python3.10/site-packages/lemonade_server/cli.py", line 727, in main
    serve(
  File "/home/ruin/.local/lib/python3.10/site-packages/lemonade_server/cli.py", line 83, in serve
    server = Server(
  File "/home/ruin/.local/lib/python3.10/site-packages/lemonade/tools/server/serve.py", line 305, in __init__
    self.local_models = ModelManager().downloaded_models_enabled
  File "/home/ruin/.local/lib/python3.10/site-packages/lemonade_server/model_manager.py", line 156, in downloaded_models_enabled
    return self.filter_models_by_backend(self.downloaded_models)
  File "/home/ruin/.local/lib/python3.10/site-packages/lemonade_server/model_manager.py", line 95, in downloaded_models
    flm_installed_checkpoints = get_flm_installed_models()
  File "/home/ruin/.local/lib/python3.10/site-packages/lemonade/tools/flm/utils.py", line 214, in get_flm_installed_models
    result = subprocess.run(
  File "/usr/lib/python3.10/subprocess.py", line 503, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
NotADirectoryError: [Errno 20] Not a directory: 'flm'
2025-10-08 21:02:52,196 - infinity_arcade.main - INFO - Stdout: Starting Lemonade Server...
2025-10-08 21:02:52,197 - infinity_arcade.main - INFO - Auto-start result: {'success': False, 'message': 'Server process died immediately'}
2025-10-08 21:02:52,197 - infinity_arcade.main - WARNING - Auto-start failed: Unknown error
2025-10-08 21:02:52,197 - infinity_arcade.main - INFO - === Returning server running status: {'running': False} ===

Expected Behavior

lemonade-server should gracefully handle FLM not being available on Linux systems and skip the FLM model check.

Reproduction

  • install (either via pypi or source)
  • run infinity-arcade
  • lemonade server v8.1.12 installs
  • 2nd step Server status fails: Lemonade Server failed to start within 16 seconds

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions