|
29 | 29 | "IPython", |
30 | 30 | "jedi", |
31 | 31 | "matplotlib", |
32 | | - "nvidia", |
33 | 32 | "notebook", |
34 | 33 | "pandas", |
35 | 34 | "tensorboard", |
36 | 35 | "tensorflow", |
37 | | - "triton", |
38 | 36 | "torchvision", |
39 | 37 | "torchaudio", |
40 | 38 | ] |
41 | | -LINUX_GPU_LIBRARY_PREFIXES = ( |
42 | | - "libc10_cuda", |
43 | | - "libcudart", |
44 | | - "libcudnn", |
45 | | - "libcufft", |
46 | | - "libcupti", |
47 | | - "libcublas", |
48 | | - "libcublasLt", |
49 | | - "libcurand", |
50 | | - "libcusolver", |
51 | | - "libcusparse", |
52 | | - "libcusparseLt", |
53 | | - "libnccl", |
54 | | - "libnvJitLink", |
55 | | - "libnvrtc", |
56 | | - "libnvToolsExt", |
57 | | - "libnpp", |
58 | | - "libtorch_cuda", |
59 | | -) |
60 | 39 |
|
61 | 40 |
|
62 | 41 | def main() -> None: |
@@ -122,8 +101,6 @@ def build_release(*, version: str, target: str, archive_dir: Path) -> tuple[Path |
122 | 101 | ) |
123 | 102 |
|
124 | 103 | shutil.copytree(pyinstaller_dist / PACKAGE_NAME, bundle_dir) |
125 | | - if target.endswith("unknown-linux-gnu"): |
126 | | - prune_linux_gpu_payload(bundle_dir) |
127 | 104 | shutil.copy2(ROOT / "README.md", staging_dir / "README.md") |
128 | 105 | shutil.copy2(ROOT / "LICENSE", staging_dir / "LICENSE") |
129 | 106 |
|
@@ -232,27 +209,5 @@ def write_github_outputs(output_path: Path, outputs: dict[str, str]) -> None: |
232 | 209 | file_handle.write(f"{key}={value}\n") |
233 | 210 |
|
234 | 211 |
|
235 | | -def prune_linux_gpu_payload(bundle_dir: Path) -> None: |
236 | | - removable_directories = [] |
237 | | - for pattern in ("**/nvidia", "**/triton"): |
238 | | - removable_directories.extend( |
239 | | - path for path in bundle_dir.glob(pattern) if path.is_dir() |
240 | | - ) |
241 | | - |
242 | | - for path in sorted(removable_directories, reverse=True): |
243 | | - shutil.rmtree(path, ignore_errors=True) |
244 | | - |
245 | | - for path in bundle_dir.rglob("*"): |
246 | | - if not path.is_file(): |
247 | | - continue |
248 | | - |
249 | | - name = path.name |
250 | | - if name.endswith(".pyc"): |
251 | | - continue |
252 | | - |
253 | | - if name.startswith(LINUX_GPU_LIBRARY_PREFIXES): |
254 | | - path.unlink(missing_ok=True) |
255 | | - |
256 | | - |
257 | 212 | if __name__ == "__main__": |
258 | 213 | main() |
0 commit comments