server: resolve asset paths relative to executable#106
Open
gmontana wants to merge 1 commit into
Open
Conversation
When a relative model or Metal source path is not found from the current working directory, try the same path relative to the running executable. This lets launchers execute ds4-server by absolute path from another working directory while preserving current-directory precedence and existing environment overrides.
Author
|
I saw the note on #49 about possibly inlining the Metal sources at build time. This PR is meant as a smaller runtime lookup fix for the current layout: it keeps CWD precedence and existing Metal source env overrides, but lets launchers start It also covers the default model path / MTP path case, which inlining Metal sources would not address. Happy to adjust the scope if you prefer a different split. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #49 by resolving relative asset paths from the executable directory when they are not found from the current working directory.
This covers:
ds4flash.ggufmetal/flash_attn.metalCurrent-directory paths still take precedence, and the existing Metal source environment overrides are still tried first.
Validation
git diff --checkmake ds4_test./ds4_test --paths --servermake ds4-servermake ds4/Users/u1770777/repos/ds4/ds4-server --ctx 2048 --port 5556from/tmpand confirmed it reachedlistening on http://127.0.0.1:5556