-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move into package (and add setup.py
) and build AppImage
#94
Conversation
4c8b7bc
to
cb750cf
Compare
setup.py
) and build AppImage
Let me know if/when you'd like to move forward with this. One possibility if you don't like the way things have been reorganized here, is that you could reorganise it into a one or more packages some other way (necessary for setup.py I think) and I can try to rebase the rest of the commits on top of your work. |
I like the setup and will merge this PR in the future. I have to test the changes first but I don't have the time at the moment. |
I've added a download models script and added it to the When trying to build the appimage I get an error [=======================================================| ] 46700/49352 94%
#15 443.3 FATAL ERROR:gzip uncompress failed with error code -3
#15 443.3 Embedding ELF...
#15 443.3 Not able to open the AppImage for writing, aborting
#15 443.3 /tmp/python-appimage-j6hecx0g/AppDir should be packaged as pix2tex-x86_64.AppImage
#15 443.3
#15 445.3 Traceback (most recent call last):
#15 445.3 File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
#15 445.3 return _run_code(code, main_globals, None,
#15 445.3 File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
#15 445.3 exec(code, run_globals)
#15 445.3 File "/usr/local/lib/python3.8/site-packages/python_appimage/__main__.py", line 113, in <module>
#15 445.3 main()
#15 445.3 File "/usr/local/lib/python3.8/site-packages/python_appimage/__main__.py", line 109, in main
#15 445.3 command.execute(*command._unpack_args(args))
#15 445.3 File "/usr/local/lib/python3.8/site-packages/python_appimage/commands/build/app.py", line 297, in execute
#15 445.3 build_appimage(destination=destination)
#15 445.3 File "/usr/local/lib/python3.8/site-packages/python_appimage/appimage/build.py", line 63, in build_appimage
#15 445.3 raise RuntimeError('Could not build AppImage')
#15 445.3 RuntimeError: Could not build AppImage This might very well be because I messed around in the setup and dockerfile. |
Hi! Thanks for taking a look at this. I have pulled a copy with your changes and it works fine for me. The first thing to do is figure out what's going wrong here. This seems to be the original error "FATAL ERROR:gzip uncompress failed with error code -3". A gzip uncompress failed, but I can't find any info except for here AppImage/AppImageKit#398 Are you running out of disk space or RAM? Can you try on another machine? I am making some other comments but not acting on them myself (yet), since I think we should make sure you are able to build/test yourself first. If you agree I can fix up the below two points: 1) I'm not sure about putting arbitrary code into 2) The new download script does not play nicely with some of the changes I made. In my original changes I am always accessing the model files using the following helper:
What this does is uses |
First of all thank you for the fast and very detailed answer. |
I already merged the package part into main (sorry I did a squash commit without understanding what it does, so you won't show up as contributor yet) |
Thanks your work on this project. It works great! I thought I would do some work so that people can get it running easier.
This PR moves everything into a Python package and adds a script to build an AppImage. Having things in a Python package will make it easier to potentially make other packages in the future.
There are still some things to do which I will list below, but if you think this is a good direction it would be good to merge as your earliest convenience since there could be a lot of conflicts with the move into a Python package.
Here is the TODO:
pipx
based installation instructions too.Eventually, if inference is e.g. moved to ONNX, then the training code could be separated into a whole separate package from the inference. For now, I think this structure works well enough.