

With the binaries, headers and everything built we can integrate torch-android into our Android Studio project. The real power of my Vagrant build box is that the platform and dependencies have been verified to work when building torch-android. It should be self-explanatory, if not just ask. If you read past the fancy VM stuff, Vagrant is just executing UNIX commands in Bash First for provisioning, then building. I encourage you to check out my Vagrantfile.

Buildboxfor manual#
I will create a separate article for this, CUDA requires some manual work.
Buildboxfor update#
If you wish to contribute or update the Vagrant build box, don’t hesitate to pull request Building torch-android with CUDA Please report build issues in the Vagrant build box Github repo You’re ready to proceed to the next article and use the built binaries in your Android Studio project.


Buildboxfor install#
Prerequisite Install Vagrant and VirtualBox. Performing the ~30 commands/actions and waiting will easily take a couple of hours so I wouldn’t recommend it, but in case Torch breaks it might be a good source of information. You might as well grab a cup of coffee and let the build box do the heavy lifting.įor heavy lifters, the manual process is documented below as well. Therefore I created a Vagrant Box that automatically builds torch-android for ARMv7 and ARMv8. There are other OS/platform specific errors as well, such errors are hard to address and subject to great variation. The most common issue reported in the Github repo today is related to building on systems with the newest versions of cmake, the build mysteriously just fails. Judging from the issues in Github I’m one of the very few. I spent a week on the task, finally after the authors got some issues fixed I had a break through. Unfortunately building torch-android requires a lot of tedious manual work and it’s error prone. The first move to get Torch working in Android is to build the native binaries and headers that you can use in your native C/C++ code.
