magenta-studio
magenta-studio copied to clipboard
Linux support
Hi! I just found this project and am curious what the barriers are to building on linux?
Happy to help contribute to make this work.
Thanks! Michael
Also I don't understand why standalone version for Windows still isn't available.
Re: Linux, this should be easy but I haven't looked into it. @teropa did you have a look at this? Re: Windows, we have limited limited cycles right now, and we haven't prioritized it yet. I am looking into it this week, but there are some difficulties around dealing with DLLs etc. Also none if us use Windows so there is a learning curve :)
So I actually just cloned the code and built on linux successfully.
The following was necessary:
- I had to install some dependencies manually
- I added linux to the output options and nameToPlatform in build.js
- I printed the temporary build directory since linux binaries are extensionless and not found by the regex, also I stopped the temp directory from being deleted so I could test the build
It looks like the app works too, I just opened a couple and then tested generate since I didn't need midi files to train it with.
@mikeza would you might contributing back changes you made to get this working?
Yeah I'd be interested in working on this, let me figure out what's up with the dependency installation.
I just tried building for linux on my mac, and the resulting build seems to work on a linux machine. However, I am not sure how to package it with an installer since the executable seems to need to live in the same folder as all of the resources.
With #16, you should be able to build the standalones with npm run --output=linux-standalone
. I'll leave this open until I have a chance to add actual packages.
I just tried building for linux on my mac, and the resulting build seems to work on a linux machine. However, I am not sure how to package it with an installer since the executable seems to need to live in the same folder as all of the resources.
Maybe consider referring to https://github.com/electron-userland/electron-packager for best practice packaging the resources and executable (or could just use the project).
I have successfully built this in February on Debian Stretch following instructions that a member of the Facebook Linux Musicians posted, as follows:
- git clone https://github.com/tensorflow/magenta-studio
- follow the install instructions to get the npm node modules installed
- In ./electron/build.js add
linux: 'linux'
to the hash nameToPlatform and comment out
windows : 'win32',
macOS : 'darwin'
- in moveFiles, comment out the await fs.remove(buildDir)
- The temp build directory is in the /tmp/
, and the electron apps for each working application is there separately.
Is it worth also making the Linux build downloadable, in addition to the sourcecode? Snap might be one way. Flatpak and Appimages are possible other ways.
For me on Archlinux, the app does not function correctly and renders as a gray box. I built using yarn install && yarn build linux-standalone
. I also had to manually install gconf dependency.
Sidenote: User flying-sheep
comments on the AUR gconf package that gconf typically is no longer a dependency of Electron apps. Is that the case here as well?