Only exclude libtorch_cuda, libtorch_cpu under torch/lib on Linux

- On Mac excluding the .dylib version of these files throws errors
  Not sure why it didn't throw during testing. Maybe the libs were cached?

- Tested on Linux again. It still seems to be passing with the above
  libs excluded. So going to keep those excluded for now. Unless
  further testing reveals those libs are really required for app
This commit is contained in:
Debanjum Singh Solanky 2022-08-18 20:54:59 +03:00
parent 6ddcbe2e75
commit 812838da54

View file

@ -32,12 +32,10 @@ a = Analysis(
noarchive=False,
)
# Filter out unused, duplicate shared libs
extension = {'Windows': '.dll', 'Darwin': '.dylib', 'Linux': '.so'}[system()]
# Filter out unused and/or duplicate shared libs
torch_lib_paths = {
join('torch', 'lib', 'libtorch_cuda' + extension),
join('torch', 'lib', 'libtorch_cpu' + extension),
join('torch', 'lib', 'libtorch_python' + extension)
join('torch', 'lib', 'libtorch_cuda.so'),
join('torch', 'lib', 'libtorch_cpu.so'),
}
a.datas = [entry for entry in a.datas if not entry[0] in torch_lib_paths]