What is the Best Approach to Dynamically Set a Default Environment to use with Pixi Tasks? #4758
Unanswered
JackEAllen
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When developing an application that must operate across multiple environments - such as with or without CUDA, depending on the availability of a CUDA-compatible GPU - it would be useful to have a straightforward method for toggling between which environment is treated as default. For instance, switching between
default = ["runtime", "dev", "test", "lint"]anddefault = ["runtime", "dev", "gpu", "test", "lint"]would simplify the execution of tasks without explicitly needing to specify an environment (e.g.pixi run mytaskinstead ofpixi run -e cpu-env mytaskorpixi run -e gpu-env mytask).What is the recommended approach to implement this functionality without modifying
pixi.toml?Additionally, is it possible to configure this through
.pixi/config.tomlso that individual environment preferences can be excluded from version control via.gitignore?Beta Was this translation helpful? Give feedback.
All reactions