Commit graph

10 commits

Author SHA1 Message Date
Debanjum Singh Solanky
b9a54c03ee Add transformers package into Khoj app to run image search 2022-08-19 19:17:54 +03:00
Debanjum Singh Solanky
00ddcfdac8 Use .ico icon when packaging for Windows (and Linux) using Pynstaller 2022-08-19 19:16:10 +03:00
Debanjum Singh Solanky
812838da54 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
2022-08-19 19:16:10 +03:00
Debanjum Singh Solanky
6ddcbe2e75 Remove files that triggered warnings during app start 2022-08-19 19:16:10 +03:00
Debanjum Singh Solanky
60dacf3f2c Show splash screen on app start. Only supported on Windows, Linux 2022-08-19 19:16:10 +03:00
Debanjum Singh Solanky
082fe937b9 Reduce Windows App Size by Removing Unused Libraries under Torch/Lib
Tighten the duplicate library removal code in Khoj.spec
2022-08-18 11:28:28 +03:00
Debanjum Singh Solanky
7cf345a138 Exclude unused mac libs under torch/lib. Reduce Mac app size by 30Mb
libtorch_cuda only seems to be imported in Linux. Which is why the
size of the Mac, Windows apps are 700Mb smaller than the Debian app size.

Guessing this is because libtorch_cuda only works on Linux machines?

Anyway, removing libtorch_{cpu,python}.dylib under torch/lib from the
Mac app reduces it's size from 190Mb to 160Mb. 15% reduction isn't too bad
2022-08-17 22:59:01 +03:00
Debanjum Singh Solanky
0273be0232 Exclude unused libs under torch/lib. Reduce Debian package size by 700Mb
- libtorch_cuda.so (1Gb) and libtorch_cpu.so (700Mb) are large shared
  libs that are available at package root and under torch/lib.
- The top level imports are used, so they unused libs are removed from
  package
- This reduces the single file package size from 1.6Gb to 920Mb
2022-08-17 22:32:58 +03:00
Debanjum Singh Solanky
a10a2ea3ad Run job matrix to wrap Khoj into app installers for Debian, Windows too 2022-08-14 03:39:45 +03:00
Debanjum Singh Solanky
e5691f9d1d PyInstaller Spec to Wrap Khoj into a Basic Native App
- Verified functionality on MacOS

- Add ICNS Icon to use as MacOS App Icon
- Spec generated by PyInstaller:
  ```sh
  pyinstaller \
       src/main.py \
       --windowed \
       --onefile \
       --name "Khoj" \
       --target-arch arm64 \
       -i src/interface/web/assets/icons/favicon.icns \
       --add-data "src/interface/web:src/interface/web" \
       --copy-metadata tqdm \
       --copy-metadata regex \
       --copy-metadata requests \
       --copy-metadata packaging \
       --copy-metadata filelock \
       --copy-metadata numpy \
       --copy-metadata tokenizers
  ```
2022-08-08 23:23:02 +03:00