11# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
2- # Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+ # Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33# SPDX-License-Identifier: Apache-2.0
44#
55# Licensed under the Apache License, Version 2.0 (the "License");
@@ -118,6 +118,13 @@ def is_installed_one(self, item: Installable) -> InstallStatusResult:
118118 return InstallStatusResult (False , f"Git repository { item .url } not cloned" )
119119 elif isinstance (item , PythonExecutable ):
120120 return self ._is_python_executable_installed (item )
121+ elif isinstance (item , File ):
122+ if (self .system .install_path / item .src .name ).exists () and (
123+ self .system .install_path / item .src .name
124+ ).read_text () == item .src .read_text ():
125+ item .installed_path = self .system .install_path / item .src .name
126+ return InstallStatusResult (True )
127+ return InstallStatusResult (False , f"File { self .system .install_path / item .src .name } does not exist" )
121128 elif isinstance (item , HFModel ):
122129 return self .hf_model_manager .is_model_downloaded (item )
123130 return InstallStatusResult (False , f"Unsupported item type: { type (item )} " )
@@ -132,6 +139,9 @@ def mark_as_installed_one(self, item: Installable) -> InstallStatusResult:
132139 item .git_repo .installed_path = self .system .install_path / item .git_repo .repo_name
133140 item .venv_path = self .system .install_path / item .venv_name
134141 return InstallStatusResult (True )
142+ elif isinstance (item , File ):
143+ item .installed_path = self .system .install_path / item .src .name
144+ return InstallStatusResult (True )
135145 elif isinstance (item , HFModel ):
136146 item .installed_path = self .system .hf_home_path # fake path is OK here as the whole HF home will be mounted
137147 return InstallStatusResult (True )
0 commit comments