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

Unable to activate conda environment on Colab #745

Closed
aviral-m opened this issue Apr 5, 2024 · 7 comments
Closed

Unable to activate conda environment on Colab #745

aviral-m opened this issue Apr 5, 2024 · 7 comments

Comments

@aviral-m
Copy link

aviral-m commented Apr 5, 2024

I've been trying to get LMFlow setup on Colab, but I'm not able to activate the conda environment using the following code -
!git clone -b v0.0.7 https://github.com/OptimalScale/LMFlow.git %cd LMFlow !conda create -n lmflow python=3.9 -y !conda activate lmflow !conda install mpi4py !bash install.sh

It tells me to use conda init before using conda activate, but it doesn't work either way.
Has anyone been able to setup LMFlow on Colab? If so, how did you activate the conda env. Thank you so much!

@research4pan
Copy link
Contributor

Thanks for your interest in LMFlow! There is an old version of Colab demo in LMFlow v0.0.2 (https://colab.research.google.com/drive/1P9Hf6_mLE7WHH92pw73j9D5kz6GTdkow?usp=sharing), which maybe helpful in the conda environment initialization 😄

@aviral-m
Copy link
Author

aviral-m commented Apr 6, 2024

Thanks for your interest in LMFlow! There is an old version of Colab demo in LMFlow v0.0.2 (https://colab.research.google.com/drive/1P9Hf6_mLE7WHH92pw73j9D5kz6GTdkow?usp=sharing), which maybe helpful in the conda environment initialization 😄

I checked out the demo, but it has the same problem of not being able to activate the conda environment -

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. To initialize your shell, run

In the demo, you proceeded to install LMFlow dependencies even though the conda environment wasn't activate, so does that mean it's not necessary?

@research4pan
Copy link
Contributor

research4pan commented Apr 6, 2024

Thanks! Strange, since this command worked about 1 year ago. But you are right, conda environment is just for environment separation. If you are in Colab, direct pip install -e . should work as well

@aviral-m
Copy link
Author

aviral-m commented Apr 8, 2024

Thanks for the help!
But when I type in pip install - e . , I get another error -
LMFlowIssue1

@research4pan
Copy link
Contributor

Hi, seems like this problem can be caused by flash attention. Maybe we can try removing it from requirements.txt to see if it works.

@aviral-m
Copy link
Author

aviral-m commented Apr 9, 2024

Ya I removed flash-attn and it worked, thanks!

@research4pan
Copy link
Contributor

You are welcome 😄 Please let us know if there are any other problems encountered

research4pan added a commit that referenced this issue Apr 10, 2024
- As reported in #745,
  its installation sometimes leads to errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants