blueaxis / Poricom

Optical character recognition in manga images. Manga OCR desktop application
GNU General Public License v3.0
298 stars 18 forks source link

Add Linux (Debian) support #52

Closed yupm closed 1 year ago

yupm commented 1 year ago

Closes #41

blueaxis commented 1 year ago

What distro did you test this on?

yupm commented 1 year ago

If the Python venv has pyinstaller, the package dependencies and fpm installed, just use: ./linux-build-deb.sh

Install fpm:

https://www.pythonguis.com/tutorials/packaging-pyqt5-applications-linux-pyinstaller/

sudo apt install ruby -y gem install fpm

yupm commented 1 year ago

Currently working on using Github Actions for CICD so that the deb can be build by Github workers. Should be done in a few days. (Only worried about the size limit) Will raise issue and PR soon.

blueaxis commented 1 year ago

Setting up GitHub Actions would be nice. I'm planning to add one for automated testing though that would be in the far future.

Only worried about the size limit

What build size are you getting? The one I built is about 3.7 GB and this is done on a clean python environment. About 2.8 GB are app binaries, most of which are CUDA-related. I wonder if there's something that can be done to reduce the size

yupm commented 1 year ago

Setting up GitHub Actions would be nice. I'm planning to add one for automated testing though that would be in the far future. What build size are you getting? The one I built is about 3.7 GB and this is done on a clean python environment. About 2.8 GB are app binaries, most of which are CUDA-related. I wonder if there's something that can be done to reduce the size

Thank you for testing! The app/dist folder is around 3.1GB for mine, and compressed deb package is around 1.5GB. Probably some binaries are getting missed out or added on different environments.

Currently I am testing building on GA, but the deb size is bigger than expected and it doesn't work. https://github.com/yupm/Poricom/actions https://github.com/yupm/Poricom/actions/runs/4844995072 It's quite late so I am going to sleep and debug it tomorrow.

yupm commented 1 year ago

There was a semantic error for the excluded_binaries list in linux.spec, hence probably those binaries weren't actually deleted. Current size for Linux is still around 3.3 GB~ unpacked and 1.8GB~ in a deb. There are complains about Pytorch's large bin sizes, eg: https://github.com/pytorch/pytorch/issues/34058 https://github.com/pytorch/pytorch/issues/17621 Size might be reduced by using CPU-only / limiting architecture / optimize manga-ocr's use of pytorch - But it's too troublesome to support especially if people start to complain about issues.