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

tool_util.deps: please support setting the platform for conda via dependency manager config key #18090

Open
mr-c opened this issue May 3, 2024 · 1 comment
Labels
area/backend area/tool-dependencies help wanted also "hacktoberfest", beginner friendly set of issues

Comments

@mr-c
Copy link
Contributor

mr-c commented May 3, 2024

In cwltool we have a test to use conda (including the bioconda channel) to install seqtk via galaxy.tool_util.deps.build_dependecy_manager.

Recently the default macos-latest GitHub Actions hosted runner switched to an M1 Apple Silicon (osx-arm64) system, which causes our test to fail as bioconda is not yet making osx-arm64 builds.

However, Apple Silicon users have Rosetta, and can install/run osx-64 binaries if a osx-64 platform conda is installed and configured with --platform osx-64

The platform mismatch could also happen to a user; this is not just a CI issue.

It would be nice if there was a conda_platform option we could set to osx-arm64 in the app_config_dict when calling galaxy.tool_util.deps.build_dependecy_manager

Would the correct procedure be as follows?

  1. Add a platform optional keyword parameter to CondaContext.__init__ and save it as an instance variable.
  2. Update CondaContext.exec_create(), to consult self.platform; adding f"--platform={self.platform}" to the args if self.platform is not None.
  3. Update galaxy.tool_util.deps.resolvers.conda.CondaDependencyResolver.__init__() where the CondaContext instantiation happens and set platform=get_option("platform"),
  4. Mention this in doc/source/admin/dependency_resolvers.rst

Note: in 3, we would look up platform as the key instead of conda_platform, as get_resolver_option automatically prefixes the name of the resolver (conda in our case) plus an underscore.

@nsoranzo
Copy link
Member

nsoranzo commented May 3, 2024

Looks like a great plan to me, thanks @mr-c !

@mvdbeek mvdbeek added help wanted also "hacktoberfest", beginner friendly set of issues area/tool-dependencies area/backend labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backend area/tool-dependencies help wanted also "hacktoberfest", beginner friendly set of issues
Projects
None yet
Development

No branches or pull requests

3 participants