coiled / feedback

A place to provide Coiled feedback
14 stars 3 forks source link

Conda solves are somehow more finicky with Coiled #54

Closed mrocklin closed 3 years ago

mrocklin commented 4 years ago

So I have this environment locally

In [1]: with open("notebook.yml") as f:
   ...:     import yaml
   ...:     env = yaml.safe_load(f)
   ...:

In [2]: env
Out[2]:
{'name': 'notebook',
 'channels': ['conda-forge', 'defaults'],
 'dependencies': ['python=3.8',
  'pip',
  'python-blosc',
  'cytoolz',
  'dask=2.23.0',
  'lz4',
  'numpy>=1.19.0',
  'pandas>=1.1.0',
  'bokeh>=2.1.1',
  'dask-image>=0.3.0',
  'dask-ml>=1.5.0',
  's3fs',
  'numba',
  'pyarrow>=0.15.1',
  'scikit-learn>=0.23.1',
  'h5py',
  'xarray',
  'bottleneck',
  'requests',
  'nodejs',
  'jupyterlab',
  'nb_conda_kernels',
  'dask-labextension']}

In [3]: import conda.api

In [4]: 1
Out[4]: 1

In [5]: solve = conda.api.Solver(prefix="-not-an-environment-", subdirs=["win-64", "noarch"], channels=env["channels"], spec
   ...: s_to_add=env["dependencies"]).solve_final_state()
Collecting package metadata (repodata.json): done
Solving environment: done

It solves on Windows without a problem

But if I try to solve that same environment with Coiled, it fails to solve on windows

In [8]: coiled.create_software_environment("mrocklin/test", conda=env)
...
Conda solve failed for windows.  Proceeding anyway.
('Long error message', <class 'conda.exceptions.UnsatisfiableError'>, "The following specifications were found to be incompatible with each other:\n\nOutput in format: 

I'm running conda 4.8.3 locally

cc @jrbourbeau

jrbourbeau commented 4 years ago

Hrm, I'm not able to reproduce solving for Windows locally:

In [6]: env
Out[6]:
{'name': 'notebook',
 'channels': ['conda-forge', 'defaults'],
 'dependencies': ['python=3.8',
  'pip',
  'python-blosc',
  'cytoolz',
  'dask=2.23.0',
  'lz4',
  'numpy>=1.19.0',
  'pandas>=1.1.0',
  'bokeh>=2.1.1',
  'dask-image>=0.3.0',
  'dask-ml>=1.5.0',
  's3fs',
  'numba',
  'pyarrow>=0.15.1',
  'scikit-learn>=0.23.1',
  'h5py',
  'xarray',
  'bottleneck',
  'requests',
  'nodejs',
  'jupyterlab',
  'nb_conda_kernels',
  'dask-labextension']}

In [7]: solve = conda.api.Solver(prefix="-not-an-environment-", subdirs=["win-64", "noarch"], channels=env["channels"], specs_to_add=env["depen
   ...: dencies"]).solve_final_state()
Collecting package metadata (repodata.json): done
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
Examining numba:  92%|█████████████████████████████████████████████████████████████████████████████████▌       | 22/24 [00:57<00:05,  2.56s// ]

I get the same result with conda 4.8.3 and 4.8.4 (latest release on conda-forge). What channel was conda installed from? defaults or conda-forge?

jrbourbeau commented 4 years ago

Just checking in here. @mrocklin is this still an issue for you? I tried again and am still not able to reproduce a successful solve with conda.api.Solver

FabioRosado commented 3 years ago

Hello, I'm thinking that perhaps the issue you were facing Matt was that the conflicts were being thrown when we used the conda base environment - similar to where we couldn't install s3fs. Since we are now creating a coiled environment, this issue should be fixed 🤔

I'm also guessing that this is the case since there were no more updates on the issue 😄