Giter Club home page Giter Club logo

Comments (9)

yakutovicha avatar yakutovicha commented on July 22, 2024

To connect to the correct environment one should use the following URL:

[apps|voila]/apps/<APP_NAME>/<NOTEBOOK>.ipynb?kernel_name=<APP_NAME>

from aiidalab.

ltalirz avatar ltalirz commented on July 22, 2024

Have you guys done a test on

  • how this affects disk size (e.g. installing all currently registered apps)
  • how this affects installation time for apps?

from aiidalab.

ltalirz avatar ltalirz commented on July 22, 2024

I'm also wondering how these different environments are going to access the AiiDA installation running in a different environment.

from aiidalab.

yakutovicha avatar yakutovicha commented on July 22, 2024

I'm also wondering how these different environments are going to access the AiiDA installation running in a different environment.

The idea is to add the path to the base conda environment to the PYTHONPATH of every app-specific environment so that AiiDA and related packages will be shared.

how this affects disk size (e.g. installing all currently registered apps)

We didn't test that yet, but we are going to do it before merging this change.

from aiidalab.

ltalirz avatar ltalirz commented on July 22, 2024

The idea is to add the path to the base conda environment to the PYTHONPATH of every app-specific environment so that AiiDA and related packages will be shared.

How does this work for installing packages?
I guess, you will also need a way to inform pip and conda in the app environment of the packages installed in that base environment you are sharing; otherwise any app that depends on AiiDA in some way (could be indirectly via some plugin) will install its own aiida version.

Would be good if there were some examples of other projects doing this, so that we can learn from them and don't need to figure out everything ourselves (and if noone does this, perhaps it's not a good idea in the first place?).

from aiidalab.

yakutovicha avatar yakutovicha commented on July 22, 2024

Another important issue we came across when testing #82 is the necessity to keep aiida and aiida plugins in the same environment. The problem is the following: when aiida is installed in the base environment it cannot see the plugins installed in the sub-environments. This makes the whole point of isolating app's dependencies unachievable.

from aiidalab.

ltalirz avatar ltalirz commented on July 22, 2024

I'm a bit puzzled how we managed to miss this glaring issue when we all looked at the proposal together.
The main problem is with the AiiDA daemon. Anything that doesn't require the daemon (even running calculations using engine.run) could in principle be executed from within the respective virtual environment, but the daemon in general needs access to all virtual environments simultaneously (which would mean their dependencies need to be compatible, which defeats the purpose of this sandboxing effort).

It seems possible in principle to record, upon submission of a new calculation, the virtual environment from which the calculation is being submitted, and to let the daemon runner execute inside this virtual environment when it picks up corresponding tasks (in principle - I don't know how involved this would be).
However, even if this worked, it would open other questions: is it really wise to record calculations from different python environments (with different AiiDA plugins installed) into the same database? The lesson may be that, in order for the data generated by apps from different python environments to be interoperable, the python environments actually do need to be compatible as well.

Of course, you could start individual daemons per environment (with separate profiles, ...).
At first sight, this would make management complicated, but perhaps it's not too difficult to make a user-friendly interface around it.
To me, this seems the only viable solution at the moment if you want to truly separate the environments of individual apps, but it would mean you can't easily access the data generated with one app from another and I'm not sure this is what we want.

I believe this topic will need another plenum discussion.
Mentioning @giovannipizzi for info

from aiidalab.

csadorf avatar csadorf commented on July 22, 2024

I agree with @ltalirz , let's have another good look at this.

One solution might be that everything aiida related (core+plugins) must be installed into the base environment and that only more lightweight dependencies like the widgets etc. are installed into the virtual environments.

from aiidalab.

csadorf avatar csadorf commented on July 22, 2024

There are currently no immediate plans to implement this model.

from aiidalab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.