Commit bf7e5c3
committed
Fix installer permission error on macOS and improve ARM64 support
This commit addresses issue #4005 where the one-line installer was
failing on macOS with a PermissionError when attempting to create
a directory named "None".
Changes:
1. Fix external_providers_dir None handling (src/llama_stack/cli/stack/run.py)
- Changed from truthy check to explicit 'is not None' check
- Use Path objects directly instead of str() conversion to avoid
converting None to the string "None"
- Added proper error handling with descriptive messages for
permission errors
- Added logging when creating external providers directory
2. Improve type conversion documentation (src/llama_stack/core/stack.py)
- Added comments explaining that empty strings from env var defaults
are converted to None
- Documented that code must check for None explicitly to avoid
str(None) creating the literal string "None"
3. Add ARM64 platform detection messaging (scripts/install.sh)
- Display informative message when ARM64 architecture is detected
- Inform users about linux/amd64 emulation via Rosetta 2
- Set expectations about potential performance impact
Testing performed:
- All unit tests pass (8/8 in test_stack_config.py)
- All pre-commit hooks pass
- Manual testing on Apple M4 (ARM64) with Podman
- Verified ARM64 detection and warning messages display correctly
- Validated that None values are handled properly without string conversion
Fixes #40051 parent 392e01d commit bf7e5c3
File tree
3 files changed
+16
-2
lines changed- scripts
- src/llama_stack
- cli/stack
- core
3 files changed
+16
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
| 492 | + | |
| 493 | + | |
492 | 494 | | |
493 | 495 | | |
494 | 496 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
180 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
181 | 190 | | |
182 | 191 | | |
183 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
312 | 315 | | |
313 | 316 | | |
314 | 317 | | |
| |||
0 commit comments