Closed Arcitec closed 1 month ago
This change almost fully gets rid of the "deprecation" spam in recent Conda versions, where anyone relying on the implicit "defaults" channel gets flooded with this ugly/"worrying" message:
"FutureWarning: Adding 'defaults' to the channel list implicitly is deprecated and will be removed in 25.3. To remove this warning, please choose a default channel explicitly via 'conda config --add channels name', e.g. 'conda config --add channels defaults'."
It still shows up one time at the end of the "conda create" command, since Conda always notifies users at least once about this upcoming change (since they want to give users a chance to manually change their global Conda config to add "defaults" if they still need it). But at least our users won't be flooded with this message during OneTrainer's install anymore.
As for the installation itself - nothing is changed compared to the old code. It still only uses conda-forge
as its installation source. We are now just even more explicit about it. The past code allowed fallback to "defaults" if conda-forge lacked a package. Now we don't. But either way, all packages we install via Conda always existed in conda-forge. Our actual requirements.txt is handled separately, via pip inside conda.
I also raised the Python version check, since it was silly that we allowed anything as old as "Python 3.0.0" to pass the version check. That wide range was inherited from the oldest launch scripts, and I just forgot to improve the range check.
Here's an example of the spam that the PR fixes:
Force-pushed a documentation improvement too, since you prefer combining commits. It's ready.
Conda recently deprecated the automatic inclusion of the "defaults" channel. It is now opt-in. But since we only use Conda for installing the base Python + Tk runtimes, we will never need anything other than the "conda-forge" channel. Therefore, let's make this explicit via
--override-channels
, which prevents all fallback channels from being used. It also protects us by ensuring that only "conda-forge" will be used.Raised the Python version check. It was looking for Python 3.0 - 3.10, but that's way too ancient for our dependencies, and could lead to installation failures. We now ensure that the user's current Conda/Venv environment contains Python 3.10 explicitly.
The documentation regarding outdated Python environments wasn't clear enough regarding Conda environments, and has also been improved.