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

build: source dependencies from conda #204

Merged
merged 4 commits into from
Mar 5, 2025

Conversation

tristanls
Copy link
Contributor

@tristanls tristanls commented Mar 4, 2025

In our current setup, we use two package managers to satisfy Monty dependencies: conda and pip. This was fine when we were not distributing Monty. However, to publish and distribute Monty, we need to pick a single source for our dependencies. Today, this needs to be conda as not all dependencies are available on pip (e.g., habitat_sim).

By using conda to source all dependencies, when we publish thousandbrainsproject::tbp.monty, we can specify dependencies that should be installed when someone installs thousandbrainsproject::tbp.monty. If we do not do this, there is no standard install method for Monty on either conda or pip. (Without a standard install method, we would be asking users to execute a custom sequence of steps; not impossible, but not as accessible as conda env create).

With the changes in this pull request, the following conda environment.yml is expected to work out of the box (once this version is published) and install all dependencies needed for Monty to run:

name: monty_lab
channels:
  - aihabitat
  - pytorch
  - pyg
  - defaults
  - conda-forge
  - thousandbrainsproject

dependencies:
  - thousandbrainsproject::tbp.monty

Note

In environment.yml above, we need to specify all the channels that tbp.monty depends on because conda dependency file does not support specifying channels (see: conda/conda-build#532). For example, even though tbp.monty depends on aihabitat::habitat-sim, in the conda dependency file this will be truncated to habitat-sim. Without specifying the necessary channels, installation will fail as habitat-sim is not in the defaults. When we specify aihabitat in the channels: property, conda install will include aihabitat::habitat-sim in the search for habitat-sim.

@tristanls tristanls marked this pull request as ready for review March 4, 2025 22:39
@tristanls tristanls requested a review from vkakerbeck March 4, 2025 22:39
@tristanls
Copy link
Contributor Author

FYI: @ramyamounir, @nielsleadholm, @hlee9212 , @scottcanoe

Copy link
Contributor

@codeallthethingz codeallthethingz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tristanls tristanls added infrastructure Changes to infrastructure triaged This issue or pull request was triaged labels Mar 4, 2025
Copy link
Contributor

@vkakerbeck vkakerbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :)

@tristanls tristanls merged commit 478c466 into thousandbrainsproject:main Mar 5, 2025
13 checks passed
@tristanls tristanls deleted the conda_deps branch March 5, 2025 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Changes to infrastructure triaged This issue or pull request was triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants