|
40 | 40 | _ps_squote, _bash_squote, _validate_serve_cmd, _parse_serve_phase, |
41 | 41 | _safe_env_prefix, _local_tooling_path_export, _append_serve_preflight_exit_lines, |
42 | 42 | _append_serve_exit_code_lines, _append_llama_cpp_linux_accel_build_lines, _cached_model_scan_script, |
| 43 | + load_stored_hf_token, |
| 44 | + _append_vllm_linux_preflight_lines, _ollama_bind_from_cmd, _pip_install_fallback_chain, |
| 45 | + _pip_install_no_cache, _user_shell_path_bootstrap, _venv_safe_local_pip_install_cmd, |
| 46 | + _diagnose_serve_output, run_ssh_command_async, |
43 | 47 | _ollama_bind_from_cmd, _pip_install_fallback_chain, _pip_install_no_cache, |
44 | 48 | _user_shell_path_bootstrap, _venv_safe_local_pip_install_cmd, |
45 | 49 | ModelDownloadRequest, ServeRequest, |
@@ -234,14 +238,7 @@ def _state_for_storage(state, on_disk=None): |
234 | 238 | return state |
235 | 239 |
|
236 | 240 | def _load_stored_hf_token() -> str: |
237 | | - if not _cookbook_state_path.exists(): |
238 | | - return "" |
239 | | - try: |
240 | | - state = json.loads(_cookbook_state_path.read_text(encoding="utf-8")) |
241 | | - env = state.get("env") if isinstance(state, dict) else {} |
242 | | - return _decrypt_secret(env.get("hfToken") if isinstance(env, dict) else "") |
243 | | - except Exception: |
244 | | - return "" |
| 241 | + return load_stored_hf_token(state_path=_cookbook_state_path) |
245 | 242 |
|
246 | 243 | def _cookbook_ssh_dir() -> Path: |
247 | 244 | # The Docker image keeps cookbook keys under /app/.ssh; that path only |
|
0 commit comments