Skip to content

Instantly share code, notes, and snippets.

@ocefpaf
Last active May 31, 2022 23:07
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save ocefpaf/863fc5df6ed8444378fbb1211ad8feb1 to your computer and use it in GitHub Desktop.
Save ocefpaf/863fc5df6ed8444378fbb1211ad8feb1 to your computer and use it in GitHub Desktop.
# See https://www.anaconda.com/understanding-and-improving-condas-performance/ for more info.
# help debug channel issues
show_channel_urls: true
# pip will always be installed with python
add_pip_as_python_dependency: true
# strict priority and conda-forge at the top will ensure
# that all of your packages will be from conda-forge unless they only exist on defaults
channel_priority: strict
channels:
- conda-forge
# when using "conda create" for envs these packages will always be installed
# adjust that list according your needs, the packages below are just a suggestion!
create_default_packages:
- ipykernel
- jupyter
- pip
safety_checks: disabled
auto_activate_base: false
# Add conda-forge and activate strict
conda config --add channels conda-forge
conda config --set channel_priority strict
conda config --set show_channel_urls True
# Make conda faster ny disabeling checks.
conda config --set safety_checks disabled
# Do not actiavte base.
conda config --set auto_activate_base False
# Install these packages by default when using `conda create`.
conda config --append create_default_packages ipykernel \
--append create_default_packages jupyter \
--append create_default_packages jupyter_contrib_nbextensions \
--append create_default_packages pip \
--append create_default_packages "blas=*=openblas" # help with the mkl vs openblas issue
@jgomezdans
Copy link

I get the following error when running conda update -all after setting up your .condarc

CustomValidationError: Parameter channel_priority = 'strict' declared in <<merged>> is invalid.
The value 'strict' cannot be boolified.

Did I miss something, @ocefpaf?

@ocefpaf
Copy link
Author

ocefpaf commented Feb 13, 2019

Did I miss something, @ocefpaf?

What is your conda version? Mine is 4.6.3. I believe that was introduced in 4.6.2 or 4.6.1.

@jgomezdans
Copy link

Aha!! 4.5.12... most problems in the world can be solved by prepending conda update conda to them!!! ;-)
Thanks!

@ocefpaf
Copy link
Author

ocefpaf commented Feb 13, 2019

Aha!! 4.5.12... most problems in the world can be solved by prepending conda update conda to them!!! ;-)
Thanks!

And create new ones sometimes 😄

But yes, conda evolves fast and using latest is usually desirable.

@phobson
Copy link

phobson commented Feb 13, 2019

blas=*=openblas

This is fantastic.

What is the "=*=" operator?

@ocefpaf
Copy link
Author

ocefpaf commented Feb 14, 2019

What is the "=*=" operator?

No idea to be honest. I guess that is it whatever needs blas use openblas.
@msarahan can probably explain it better.

@tadeu
Copy link

tadeu commented Feb 14, 2019

I think it means "any version with the openblas build string", i.e., it could be =1.0=openblas, =1.1=openblas, etc.

@ocefpaf
Copy link
Author

ocefpaf commented Feb 15, 2019

I think it means "any version with the openblas build string", i.e., it could be =1.0=openblas, =1.1=openblas, etc.

Thanks for the explanation @tadeu!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment