microsoft / farmvibes-ai

FarmVibes.AI: Multi-Modal GeoSpatial ML Models for Agriculture and Sustainability

Home Page:https://microsoft.github.io/farmvibes-ai/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error installing env.yaml file via Conda

chetan2309 opened this issue · comments

@renatolfc

System details -

  • Running this command on Azure Ubuntu VM 20.04.6 LTS
  • Conda latest version

I have been tinkering with farmvibes for last 2-3 days, Since I don’t have a UNIX based machine, I ended up setting a

• Azure VM
• And since local setup was giving error I setup an AKS cluster.

Finally, I was able to run hello world workflow of farmvibes successfully on a AKS cluster. 😊

My interest and intentions on farmvibes are primarily from ADMA perspective to start off with. I am running into a few errors while trying to setup/create by executing one of the conda commands. The Shell just stays there for eternity 😊 Tried this at least 5 times.

This remains stuck at this screen. Is there any way I can see logs of this to check what's happening?

image

This doesn't happen only for installing this env file. It happens if I pick any other notebook env file also. Happening across the board.

I have the same problem when used the crop_env.yaml file. I see the las update was 2 years ago.

I'm having the same problem...
In my case, creating the environment for deepmc notebooks takes for ever... And at some point, it freezes the Ubuntu 20.04 box.

Question; if I use the Azure AKS cluster to run all the heavy processes, do I still need to create the environments? How is the process split in this case? I guess the heavy side of the process will be ran in the AKS cluster, so why I still need the environment? (sorry for my ignorance on this subject)

Thanks in advance!
Greg

Hi Folks,

Thank you for bringing up this issue. I am currently investigating it and will provide a solution soon.

In response to @gregcode123's question,

The local environment env.yaml is crucial for processing and utilizing the data provided and required by FarmVibes. For example, the vibe_core package is needed to use the FarmVibes.AI client, which makes calls to the FarmVibes.AI cluster. Furthermore, rasterio, xarray, and cartopy are important packages for consuming and loading data from output rasters (FarmVibes.AI assets).

Thanks

Please consider using micromamba instead of conda. We have tested the environment creation process and it typically took around 2-3 minutes to finish.

The command for creating the environment should be:

micromamba  env create -f env.yaml  
micromamba activate farmvibes-ai  

Please let us know if this works for you. The updated documentation will be ready by the time of the next release.

Hello @brsilvarec

I tried this;
$ micromamba env create -f deepmc_env.yaml
but I get following errors:

error    libmamba Could not solve for environment specs
    The following packages are incompatible
    ├─ python 3.8.*  is installable with the potential options
    │  ├─ python [3.8.0|3.8.1|...|3.8.8], which can be installed;
    │  ├─ python [3.8.0|3.8.1] would require
    │  │  └─ python_abi * *_cp38, which can be installed;
    │  └─ python [3.8.10|3.8.12|...|3.8.8] would require
    │     └─ python_abi 3.8.* *_cp38, which can be installed;
    ├─ pytorch ~=1.12.1  is installable with the potential options
    │  ├─ pytorch [1.10.2|1.11.0|1.12.1] would require
    │  │  └─ python >=3.7,<3.8.0a0 , which conflicts with any installable versions previously reported;
    │  ├─ pytorch [1.10.2|1.11.0|1.12.1] would require
    │  │  └─ python >=3.9,<3.10.0a0 , which conflicts with any installable versions previously reported;
    │  ├─ pytorch [1.10.2|1.11.0|1.12.1] would require
    │  │  ├─ python >=3.7,<3.8.0a0 , which conflicts with any installable versions previously reported;
    │  │  └─ python_abi 3.7.* *_cp37m, which conflicts with any installable versions previously reported;
    │  ├─ pytorch [1.10.2|1.11.0|1.12.1] would require
    │  │  ├─ python >=3.9,<3.10.0a0 , which conflicts with any installable versions previously reported;
    │  │  └─ python_abi 3.9.* *_cp39, which conflicts with any installable versions previously reported;
    │  ├─ pytorch [1.10.2|1.11.0|1.12.1] would require
    │  │  └─ python >=3.10,<3.11.0a0 , which conflicts with any installable versions previously reported;
    │  ├─ pytorch [1.11.0|1.12.1] would require
    │  │  ├─ python >=3.10,<3.11.0a0 , which conflicts with any installable versions previously reported;
    │  │  └─ python_abi 3.10.* *_cp310, which conflicts with any installable versions previously reported;
    │  ├─ pytorch [1.11.0|1.12.1] would require
    │  │  └─ __cuda, which is missing on the system;
    │  └─ pytorch 1.12.1, which can be installed;
    └─ torchvision ~=0.11.3  is not installable because there are no viable options
       ├─ torchvision 0.11.3 would require
       │  └─ python >=3.6,<3.7.0a0 , which conflicts with any installable versions previously reported;
       ├─ torchvision 0.11.3 would require
       │  └─ python >=3.7,<3.8.0a0 , which conflicts with any installable versions previously reported;
       ├─ torchvision 0.11.3 would require
       │  └─ pytorch 1.10.2  but there are no viable options
       │     ├─ pytorch 1.10.2 would require
       │     │  └─ python >=3.6,<3.7.0a0 , which conflicts with any installable versions previously reported;
       │     ├─ pytorch [1.10.2|1.11.0|1.12.1], which cannot be installed (as previously explained);
       │     ├─ pytorch 1.10.2 conflicts with any installable versions previously reported;
       │     ├─ pytorch [1.10.2|1.11.0|1.12.1], which cannot be installed (as previously explained);
       │     ├─ pytorch [1.10.2|1.11.0|1.12.1], which cannot be installed (as previously explained);
       │     ├─ pytorch [1.10.2|1.11.0|1.12.1], which cannot be installed (as previously explained);
       │     └─ pytorch [1.10.2|1.11.0|1.12.1], which cannot be installed (as previously explained);
       ├─ torchvision 0.11.3 would require
       │  └─ python >=3.9,<3.10.0a0 , which conflicts with any installable versions previously reported;
       ├─ torchvision 0.11.3 would require
       │  ├─ python >=3.7,<3.8.0a0 , which conflicts with any installable versions previously reported;
       │  └─ python_abi 3.7.* *_cp37m, which conflicts with any installable versions previously reported;
       ├─ torchvision 0.11.3 would require
       │  └─ pytorch [* cpu*|>=1.10.2,<1.11.0a0 ] but there are no viable options
       │     ├─ pytorch 1.10.2, which cannot be installed (as previously explained);
       │     ├─ pytorch [1.10.2|1.11.0|1.12.1], which cannot be installed (as previously explained);
       │     ├─ pytorch 1.10.2 conflicts with any installable versions previously reported;
       │     ├─ pytorch [1.10.2|1.11.0|1.12.1], which cannot be installed (as previously explained);
       │     ├─ pytorch [1.10.2|1.11.0|1.12.1], which cannot be installed (as previously explained);
       │     ├─ pytorch [1.10.2|1.11.0|1.12.1], which cannot be installed (as previously explained);
       │     ├─ pytorch [1.10.2|1.11.0|1.12.1], which cannot be installed (as previously explained);
       │     └─ pytorch * conflicts with any installable versions previously reported;
       ├─ torchvision 0.11.3 would require
       │  └─ pytorch [* cpu*|>=1.11.0,<1.12.0a0 ] but there are no viable options
       │     ├─ pytorch [1.10.2|1.11.0|1.12.1], which cannot be installed (as previously explained);
       │     ├─ pytorch [1.10.2|1.11.0|1.12.1], which cannot be installed (as previously explained);
       │     ├─ pytorch [1.10.2|1.11.0|1.12.1], which cannot be installed (as previously explained);
       │     ├─ pytorch [1.10.2|1.11.0|1.12.1], which cannot be installed (as previously explained);
       │     ├─ pytorch [1.10.2|1.11.0|1.12.1], which cannot be installed (as previously explained);
       │     ├─ pytorch 1.11.0 conflicts with any installable versions previously reported;
       │     ├─ pytorch [1.11.0|1.12.1], which cannot be installed (as previously explained);
       │     ├─ pytorch [1.11.0|1.12.1], which cannot be installed (as previously explained);
       │     └─ pytorch * conflicts with any installable versions previously reported;
       ├─ torchvision 0.11.3 would require
       │  ├─ python >=3.9,<3.10.0a0 , which conflicts with any installable versions previously reported;
       │  └─ python_abi 3.9.* *_cp39, which conflicts with any installable versions previously reported;
       ├─ torchvision 0.11.3 would require
       │  └─ pytorch * cuda*, which conflicts with any installable versions previously reported;
       └─ torchvision 0.11.3 would require
          └─ python >=3.10,<3.11.0a0 , which conflicts with any installable versions previously reported.
critical libmamba Could not solve for environment specs

@gregcode123 - I faced this too. you can resolve this by using -> pytorch~=1.10.2 in the file on line no - 10. This will help resolve the dependencies.

Thanks @chetan2309
I was able to build the environment, but using the deepmc notebook gives an import error:

ImportError: cannot import name '_compare_version' from 'torchmetrics.utilities.imports'

I changed python=3.9 and pytorch=1.10.2

Also;
torchvision=0.11.3

Any recommendation?
Thanks

Just add torchmetrics~=0.7.0 to the requirements of the env, or pip install it separately.

The updated yaml looks like:

name: deepmc-pytorch
channels:
  - pytorch
  - conda-forge
  - defaults
dependencies:
  - python=3.8.*
  - pip~=21.2.4
  - einops~=0.6.0
  - pytorch~=1.10.2
  - shapely>=1.7.1
  - geopandas~=0.9.0
  - rasterio~=1.2
  - torchvision~=0.11.3
  - xarray~=0.19.0
  - rioxarray~=0.7.1
  - ipython~=7.31.0
  - ipywidgets~=7.6.5
  - pyWavelets~=1.3.0
  - scikit-learn~=1.1.2
  - pip:
      - matplotlib~=3.4.0
      - numpy~=1.23.2
      - onnx~=1.12.0
      - onnxruntime~=1.13.1
      - torchmetrics~=0.7.0
      - pytorch-lightning==1.7.3
      - tqdm~=4.64.0
      - unfoldNd~=0.2.0
      - ../../src/vibe_core

This will be in the next release, along other updates to the environment yamls and the documentation.
Thanks for the patience, @gregcode123

Please consider using micromamba instead of conda. We have tested the environment creation process and it typically took around 2-3 minutes to finish.

The command for creating the environment should be:

micromamba  env create -f env.yaml  
micromamba activate farmvibes-ai  

Please let us know if this works for you. The updated documentation will be ready by the time of the next release.

@brsilvarec @rafaspadilha - I was able to resolve it using Mamba, I haven't tried micromamba. But I am sure it will work too.

Closing the issue for now, folks. Feel free to reopen or create a new one if you have additional doubts.