OpenChatKit icon indicating copy to clipboard operation
OpenChatKit copied to clipboard

Conda takes too long to install dependencies

Open csris opened this issue 2 years ago • 3 comments

Describe the bug One user reported conda env create -f environment.yml taking over 60 minutes. We need a better solution.

To Reproduce Steps to reproduce the behavior:

  1. Run conda env create -f environment.yml from the root of the repo.

Expected behavior Should finish in a "reasonable" amount of time.

csris avatar Mar 11 '23 23:03 csris

+1 on this.

satpalsr avatar Mar 12 '23 04:03 satpalsr

After some research, many projects seem to be recommending mamba for faster installation (see this article for more details). I just tested it, and it does seem much faster.

Installing mamba itself takes about 30 seconds.

time conda install mamba -n base -c conda-forge
...
real    0m29.866s                                                                                                                                                                                                                                    
user    0m20.274s                                                                                                                                                                                                                                    
sys     0m2.779s                                                                                                                                                                                                                                     

Installing the entire environment.yml takes about 2.5 minutes.

time mamba env create -f environment.yml -n OpenChatKit-Test
...
real    2m22.678s
user    2m20.410s
sys     0m10.147s

Normal conda commands appear to work just fine with this environment. I'm going to do a short training run and make sure it succeeds before updating the README.

For now, if others are running into this issue, please give mamba a try.

  1. Install mamba in base so it's available in all environments.
conda install mamba -n base -c conda-forge
  1. Create a new environment by running this command from the root of the repo:
mamba env create -f environment.yml -n OpenChatKit-Test

csris avatar Mar 12 '23 07:03 csris

Training ran fine. I'll update the README to suggest using mamba.

csris avatar Mar 12 '23 09:03 csris