Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One conda environment to rule them all #315

Closed
MarvinLvn opened this issue Oct 20, 2021 · 9 comments · Fixed by #26
Closed

One conda environment to rule them all #315

MarvinLvn opened this issue Oct 20, 2021 · 9 comments · Fixed by #26
Assignees
Labels
enhancement New feature or request installation

Comments

@MarvinLvn
Copy link
Contributor

Installation instructions such as found in the readthedocs seem a bit complicated. You have instructions for both conda users and non-conda users, admin users and non-admin users.

In other words, there are multiple paths for installing the package and its dependencies depending on your profile. That makes it hard for users to 1) follow the path they have to follow 2) you debugging installation depending on what users understood from the instructions

Would it be possible to provide an environment.yml (example here) so that users just have to run :

conda env create -f datalad.yml
conda activate datalad

This way, you'd make sure users don't have access rights problem and have all of the required dependencies installed.
For instance, the doc says :

Screenshot from 2021-10-20 12-08-39

This can be specified in the .yml file and you could get rid of that note.

@MarvinLvn MarvinLvn added the enhancement New feature or request label Oct 20, 2021
@lucasgautheron
Copy link
Collaborator

lucasgautheron commented Oct 20, 2021

Yes, that would be great!

Unfortunately, there are lots of dependencies which are not available through conda or not for all platforms (this includes git-annex, which is available on Linux, but not on MacOS). That's what stopped me when I tried the full-conda approach : in the end, we still have to provide instructions for the remaining packages, and these instructions depend on the user installation. So you end up increasing the complexity even further

Here is an ongoing effort towards providing access to ChildProject through conda and what is slowing it down (without even considering datalad/git-annex): #297

(It could very well be that my limited understanding of conda is a factor here though)

@MarvinLvn
Copy link
Contributor Author

Across-OS compatibility is a real pain :/
Maybe we can think of something like :

  1. One conda environment
  2. FAQ section that handle user-specific / OS-specific problems

@lucasgautheron
Copy link
Collaborator

lucasgautheron commented Oct 20, 2021

Yeah, I'm gonna head towards that direction!

@lucasgautheron
Copy link
Collaborator

Okay, these are the new proposed instructions.
Testing welcome!

https://childproject.readthedocs.io/en/conda/install.html

@lucasgautheron lucasgautheron linked a pull request Oct 20, 2021 that will close this issue
@MarvinLvn
Copy link
Contributor Author

MarvinLvn commented Oct 20, 2021

Seems to work but :

  • the wget command returns the html code of the page, not the file. (you might want to use curl ? although that means installing curl T_T)
  • the command pip install ChildProject should be moved to the .yml file and removed from the instructions

Something like this should work :

name: childproject
channels:
  - conda-forge
  - defaults
dependencies:
  - python=3.7
  - ffmpeg
  - git-annex>=8.2
  - pip
  - pytest
  - sox
  - pip:
    - scipy
    - ChildProject

EDIT : you may want to specify version for git-annex

@MarvinLvn
Copy link
Contributor Author

Also : with the new instructions it took me 5 minutes to install all the dependencies and 0 brain cell 🥇

@MarvinLvn
Copy link
Contributor Author

MarvinLvn commented Oct 20, 2021

On second thought, why not something like :

git clone [email protected]:LAAC-LSCP/ChildProject.git
conda env create -f env_linux.yml 
conda activate childproject
pip install .

no need for wget and curl

For MAC Users :

brew install git-annex
git clone [email protected]:LAAC-LSCP/ChildProject.git
conda env create -f env_macos.yml 
conda activate childproject
pip install .

@lucasgautheron
Copy link
Collaborator

Seems to work but :

  • the wget command returns the html code of the page, not the file. (you might want to use curl ? although that means installing curl T_T)
  • the command pip install ChildProject should be moved to the .yml file and removed from the instructions

Something like this should work :

name: childproject
channels:
  - conda-forge
  - defaults
dependencies:
  - python=3.7
  - ffmpeg
  - git-annex>=8.2
  - pip
  - pytest
  - sox
  - pip:
    - scipy
    - ChildProject

EDIT : you may want to specify version for git-annex

Of course! Sorry about that;

@lucasgautheron
Copy link
Collaborator

lucasgautheron commented Oct 20, 2021

On second thought, why not something like :

git clone [email protected]:LAAC-LSCP/ChildProject.git
conda env create -f env_linux.yml 
conda activate childproject
pip install .

no need for wget and curl

I like to use pypi (because of version management and all);
But I guess one could still do:

brew install git-annex
git clone [email protected]:LAAC-LSCP/ChildProject.git --depth 1 -b master
conda env create -f env_macos.yml # including ChildProject from pypi
conda activate childproject

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request installation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants