@@ -31,25 +31,23 @@ def handle(self, *args: Any, **options: Any) -> None:
3131 self .stdout .write ("Initialized DVC repository" )
3232
3333 # Configure chunking for large files
34- try :
35- subprocess .run (
36- ["dvc" , "config" , "cache.type" , "hardlink,symlink" ],
37- cwd = repo_path ,
38- check = True ,
39- )
40- self .stdout .write ("Configured DVC cache type" )
41- except subprocess .CalledProcessError as e :
42- logger .warning (f"Failed to configure cache type: { str (e )} " )
34+ subprocess .run (
35+ ["dvc" , "config" , "cache.type" , "hardlink,symlink" ],
36+ cwd = repo_path ,
37+ check = True ,
38+ )
39+ subprocess .run (
40+ ["dvc" , "config" , "cache.shared" , "group" ],
41+ cwd = repo_path ,
42+ check = True ,
43+ )
4344
44- try :
45- subprocess .run (
46- ["dvc" , "config" , "cache.shared" , "group" ],
47- cwd = repo_path ,
48- check = True ,
49- )
50- self .stdout .write ("Configured DVC cache sharing" )
51- except subprocess .CalledProcessError as e :
52- logger .warning (f"Failed to configure cache sharing: { str (e )} " )
45+ # Configure cache size limits to prevent excessive disk usage
46+ subprocess .run (
47+ ["dvc" , "config" , "cache.size_limit" , "10G" ],
48+ cwd = repo_path ,
49+ check = True ,
50+ )
5351
5452 self .stdout .write ("Configured DVC for large file handling" )
5553
0 commit comments