Comments (4)
@tzpr If this is the first time that you're installing PyTorch Live using the M1 Chip, I recommend you to install first these dependencies (before executing the npx torchlive-cli setup-dev
command) executing all the commands with a Terminal that uses Rosetta:
- The version 3.9.5 of Python and the command
python3 -V
must output the version 3.9.5. The commandpython3
is used to install the requirements and make the models. However, an specific version of torchvision requires a version of Python greater than the version 3.9.0 and smaller than the version 3.9.9 I think. In my case, the version 3.9.5 works fine. - The version 16 of Node (if you use the version 17 you will run into an issue).
- Watchman: Just to
brew install watchman
(I don't know why this command fails each time I use the commandsetup-dev
. So to prevent it, just install it directly using HomeBrew). - Android Studio and the Android SDK Manager.
- Android Emulator -> Go to Android Studio. If the Android Emulator is not install, you can install it in System Preferences > Appearances & Behavior > System Settings > Android SDK > SDK Tools. If the Android Emulator is already installed, delete it and install it again.
- The PyTorch Live AVD for the ARM architecture. Until the PR #24 is not accepted, I recommend you to do the following steps:
Clone my forked repository and go to the arm-emulator
branch:
$ git clone https://github.com/aaronespasa/live.git
$ cd live
$ git checkout arm-emulator
Go to the torchlive-cli
folder and install the Node dependencies:
$ cd torchlive-cli
$ npm install
And now, run the setup-dev
command from there:
$ npm run start setup-dev
Now, all the dependencies should be correctly installed and you can init your first project and run it using the Android emulator 🎉
If you have some issues during the installation of these dependencies, just let me know and I'll help you as soon as I can!
from playtorch.
Hi @tzpr , thanks for reporting the issue!
Currently, PyTorch Live does not work with a version of OpenJDK greater than the version 8. However, the version 8 of the Java Platform has not been built natively for Apple Silicon.
I recommend you to execute the terminal using Rosetta:
- Go to the Applications folder, do right click on the Terminal app and select Get Info.
- Click on the checkbox "Open using Rosetta".
By executing the terminal using Rosetta I think that you won't have any issues at the time of installing openjdk@8 using HomeBrew. I'm using a M1 MacBook and this solution works fine in my case.
Let me know if this solution works also for you!
from playtorch.
@aaronespasa, thanks a bunch for chiming in and helping out with steps and the PR #24
@tzpr, we merged PR #24. The updates are available in the nightly build of the PyTorch Live CLI. You can use the nightly by adding @nightly
after the torchlive-cli
. For example, the setup-dev
command using the nightly looks as follows:
npx torchlive-cli@nightly setup-dev
I don't have an M1 device at hand, so I haven't tested the nightly on an M1 device myself (I requested a device today, so hopefully I'll be able to better support M1 in the near future ;)). We are also currently evaluating the option of upgrading PyTorch Live to use React Native v0.65+, which promises to fix several Apple Silicon device issues (e.g., M1/M1 Pro)
from playtorch.
Hi @aaronespasa, thank you for the information and help!
I just got the PyTorch Live example project (MyFirstProject) running on my Android 10 phone (rather old Nokia 6.1).
The key thing was that I started running the terminal with Rosetta. I also realized that I needed to install Homebrew using Rosetta because it installs in different location than the M1 version that I already had.
I went through all the steps listed above using Rosetta and arch -x86_64
Homebrew. One thing that is different is that my Python version is 3.9.9., couldn't find 3.9.5 from homebrew.
The setup-dev
wasn't satisfied with the Android SDK Manager installation and started installing the items. It was taking some time so I ended up checking from the AndroidSDKManagerInstaller.ts
file what are the items installed in that step and installed them from the terminal using the sdkmanager
command. This way I was able to see what took time and how long. After that I executed the npx torchlive-cli@nightly setup-dev
command again.
I was using the nightly version of the torchlive-cli
like @raedle advised, but like I said I didn't try the emulator yet, just my phone.
Thanks again for the help and quick reply @aaronespasa and @raedle .
from playtorch.
Related Issues (20)
- PlayTorchJSIModule not found - ios & android m2 macbook pro HOT 2
- It is not possible to convert audio float32 tensor to playable uint8 audio expected by .audioFromBytes() HOT 1
- How to specify interpolation in transforms.resize?
- AudioUtil is not working on Android
- How to convert my yolov5s.pt to yolov5s.ptl HOT 1
- resize function gives error: 'Factory function resize expects 1 argument but 4 are given.'
- Cannot scan QR code from the PlayTorch app HOT 2
- playtorchjsimodule not found
- Mac M1 tutorial failure HOT 2
- unable to load local .ptl model HOT 2
- How to export a Huggingface transfromer model? HOT 3
- react_native_pytorch_core error during gradle build HOT 15
- image data fetch
- Is there a processing step im missing when using a custom trained yolo model?
- Is this project still maintained?
- Unable to work
- CMake Error
- Android build fails | Expo app using prebuild HOT 4
- 'react_native_pytorch_core-Swift.h' file not found during ios build HOT 1
- Add how to use EAS (Expo Application Service) build within this tutorial
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from playtorch.