From 812838da545a14bb672d33c7469eb528cb7601f9 Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Thu, 18 Aug 2022 20:54:59 +0300 Subject: [PATCH] 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 --- Khoj.spec | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Khoj.spec b/Khoj.spec index 9d6df897..e37af0d8 100644 --- a/Khoj.spec +++ b/Khoj.spec @@ -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]