-
Notifications
You must be signed in to change notification settings - Fork 82
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
Linux support (rebased to latest version) #33
Conversation
Setting no window icon on Linux, since TKinter does not seem to support .ico files, nor .png or even .xbm. Excluding Linux resolves the error: _tkinter.TclError: bitmap "noScribeLogo.ico" not defined
Nice, thank you! We will take a closer look in the coming days. One question: I'm not familiar with git submodules. Can you explain briefly what you did there and what the advantages are? |
Sure, git submodules are essentially a git repository referred inside your repository (since the huggingface models are also git repositories). Here is a short summary from the git documentation. There are advantages but also some disadvantages of using submoduling in a project. The benefits are that the files in the submodules are integrated as if they where copied directly in these folders (i.e., the exact thing you described in the download.txt files) and they keep the whole commit history of the referred submodule + refer to a certain fixed commit, so when the remote git repo is updated the submodule stays at this commit, ensuring that your software still works, even if something changed remotely. So it's your consideration whether you want to use it in this repository. I just introduced them because I think it's a good use case for submodules, but I'm also used to working with it so I understand if would complicate the repo situation too much (in that case I can remove the submoduling from this PR if you like). If you like to keep it I can also update the README how to properly checkout the repo with the submodules. |
This PR has still one shortcoming: The link at the end of the transcription does not work with noScribeEdit yet. I probably will first fall back to simply opening the html page in a browser and see if I can get noScribeEdit to work on Linux. I could also envision integrating noScribeEdit as a submodule if you like the idea of working with submodules (that way it would not be necessary to use the command but it could rather be spawned from the python code directly, which would practically make it platform independent). |
Thank you for the explanation regarding submodules. Your approach makes sense in the current situation. But for the future, there is a good chance that we will deviate from the official repo of faster-whisper and host our own models somewhere else. Even right now, the installer of noScribe already ships with a quantized version of the “small” model that is not in the official repo (you can still use the original model no problem, it’s just a bit bigger). In essence, I would rather not use submodules to stay flexible. Regarding noScribeEdit: It would be great if you could get this running on Linux too. Having an easy way of controlling and correcting the transcripts is very important and was a crucial consideration for me from the very beginning of developing noScribe. One reason for switching from Word-Macros to my own editor (with v.0.4) was to make this correction function more accessible for people who are not using proprietary software. |
If this is your only concern I think you can also do fine with the submodule approach. You can just add your own models as a submodule (currently the large and small model also live side to side in their own submodules), replace the old ones or add your own data as a download. Actually, that's what submodules are partially build for: to have a drop in replacement in a particular folder (just change the submodule and you're good to go. At least when the structure matches). As far as I see it you can change between the two models in the GUI, right? So you could also build a
Yes, I just quickly tried to get it to run on linux yesterday and wasn't even aware of the I think porting noScribeEdit to linux will be straightforward. I only had a quick look, but it's already running. Only the conversion fails because there is no linux Regarding the submoduling or using directly from python code: I think I would suggest that I give porting |
Hosting models elsewhere as a submodul would mean hosting them on some kind of git server, which is not trivial given the size of the files. Other than that, your suggestion sounds good. Using the webrowser as a fallback for viewing is a good idea. But please add a message box explaining that noScribe comes with it's own editor to review and correct the transcript and how people can install it (or, for the time beeing, that this editor will become available on Linux soon). |
No, not really. Right now, noScribe is mainly targeted at not so tech-savy people (qualitative researchers and journalists in particular). But maybe there are other use cases? May I ask what you are planing to do with noScribe? You seem to come from a quite different field (but also from Frankfurt, funny enough). |
Yes, no problem. I'll revert it to the previous state.
Yes, I can certainly add this.
Actually, I'm just helping out a friend who needed to run the software on a linux system. But I think noScribe is a nice project and seems really helpful for leveraging such ML models for a wider audience that I thought that I make it a proper contribution instead of just hacking it together :). |
Hey @kaixxx, I removed the submoduling and added a call for noScribeEdit. There is a pull request for noScribeEdit which adds the necessary changes to let it run under linux. |
This looks nice, thank you. Please give us a few days to review the code and test it on the various platforms. One note: It seems that you had problems loading the logo icon under linux. There is also a png-version in the repo. You may try using that. |
No, I think we'll stick with the ico for Windows and MacOS. "Never change a working icon", you know... |
Works with png 👍️ |
changing `platform.system() in ["Darwin", "Linux"]` to `("Darwin", "Linux")`
The editor is a vital part of noScribe, so I don't want the launch to fail silently, using the browser as a fallback. It now throws an error if noScribeEdit is not found. Second small change: `program: str | None = None` seems to be python 3.10 syntax. Changed it to `program: str = None`
@domna Thank you again for the great work. I have merged the PR with minor adjustments. One last thing for now: Could you write some short installation instructions for Linux? See this section of the Readme: https://github.com/kaixxx/noScribe#download-and-installation |
@domna Forgot something: Do you have binaries for us to share? |
This is great news, thanks for the work on this - but please create a new release with install instructions, I am not clear if the current main branch can be installed on linux? |
Actually, I just ran python directly in the repo and didn't create any binary. This should be sufficient for running it:
It should work for any python version noScribe supports and is ideally done in a new environment. For noScribeEditor, this has of course to be build by itself and put into the correct location. I'll try to create an installer with pyinstaller and provide it. It will take some time though as I don't have too much time to work on this right now (but until then the above install instructions should help) and I don't have any experience with pyinstaller. |
linux and macOS shouldn't be that different from building. I can provide my spec file and shell command (gonna make it an shell (
|
@domna: I've got quite a few requests over the last couple of weeks from people interested in running noScribe on Linux. I always point them to your instructions above. But not all of them are comfortable running python etc. So it would be absolutely wonderful if you could find the time to make a binary... |
@domna thank you for the Linux script - I d like to respectfully request yeta notehr step owards easy usage on linux: an appimage and/or flatpack or even a snap would also be greatly appreciated. AppImages to me seem the best solution distro-agnostic, package their dependencies and cal easily be updated. Unlike flatpack or snap they don't require anything else to be installed to work (that said I do see the advantages of flatpack) |
Sure. I'm traveling right now but I'll look into it next week. |
Hey @menelic, sorry I don't really have time to create such a package as I'm not really experienced with that, so I would need to learn the whole process of it. However, I contributed a build spec for binary files now #63 and once this is distributed somewhere you should be able to download and run noScribe easily. I think it would be easy to use this as a basis for an appimage or flatpak if someone would be interested in creating and maintaining this. |
This adds linux support for the latest version (based on #23) and integrates the ML models as git submodules.
ToDo: