holzschu / Carnets

Carnets is a stand-alone Jupyter notebook server and client. Edit your notebooks on the go, even where there is no network.
https://holzschu.github.io/Carnets_Jupyter/
BSD 3-Clause "New" or "Revised" License
567 stars 34 forks source link

Installing pyTorch #214

Open vzhilov opened 2 years ago

vzhilov commented 2 years ago

Hello! Is it possible to install pyTorch to use AI models on iPad (mine is iPad Pro 2020)

holzschu commented 2 years ago

PyTorch is not yet available. It will be for the next major release, or maybe a separate app. In the meantime, you have both scikit-learn and coremltools in Carnets-with-scipy, which, I think, allow you to use AI models on iPad.

AidanShipperley commented 2 years ago

Hi @holzschu, coremltools does have support for many more models, but provides no functionality to actually train a model, making libraries like PyTorch and Tensorflow/Keras the only way to train the many more complex models that exist.

Is there any way that we could help with the rewriting of code/development for PyTorch or Tensorflow? I would happily dedicate my time if it meant bringing these packages to iOS. Especially with certain iPad models literally having a desktop chip.

Thank you so much!

essandess commented 1 year ago

I’d also like to see PyTorch with MPS support, which should be quite fast on iPad Pro’s with M1 or M2 chips. An example build formula for macOS is at MacPorts.

holzschu commented 1 year ago

I'm afraid that compiling a package for iOS is very different to compiling a package for the Mac. Even though the processors are identical, the operating systems are not. I usually have to edit the code in order to adapt to the specificities of iOS.

Kevin-Huang2000 commented 1 year ago

PyTorch is not yet available. It will be for the next major release, or maybe a separate app. In the meantime, you have both scikit-learn and coremltools in Carnets-with-scipy, which, I think, allow you to use AI models on iPad.

Hi @holzschu ,so when would the next major release that you were saying? Really appreciated if it was already done, and cheer up if you are still working on it.

holzschu commented 1 year ago

If something is complicated, I allocate a large time slot for working on it. With PyTorch, I know I'll need a lot of time to make it work. It's going to be several months, probably.

Peter230655 commented 1 year ago

Your app is positively GREAT! I use it nearly every day.

MJ-MQ commented 9 months ago

BTW, PyTorch now has an iOS page. This seems to be mainly about the C++ side, no Python integration.

I agree with all the comments about how great Carnets is -- it is really fantastic!

jakirkham commented 9 months ago

AIUI the builds in this app targets WASM

Whereas the instructions there are thinking of native iOS builds

The approaches and issues that occur between the two are likely different

That said, maybe if a different approach were taken, like bundling PyTorch with the app instead of letting users install it separately, then the iOS instructions would apply

Am also curious whether the changes Apple is taking to meet EU DMA regulations allow any new distribution options (like native binaries). Though that may be a whole separate, interesting conversation