CosmiQ / solaris

CosmiQ Works Geospatial Machine Learning Analysis Toolkit
https://solaris.readthedocs.io
Apache License 2.0
413 stars 112 forks source link

[BUG]: docker/gpu/Dockerfile does not build #418

Open spdavern opened 3 years ago

spdavern commented 3 years ago

Summary of the bug

Attempting to build the Dockerfile at Solaris/docker/gpu/Dockerfile fails.

Steps to reproduce the bug

Build the docker image from docker/gpu/Dockerfile

git clone https://github.com/CosmiQ/solaris.git
cd solaris
docker build --pull --rm -f "docker/gpu/Dockerfile" -t solaris_gpu:latest "docker/gpu" <

Error message

The above steps produces this error message on step 13 of 19:

...
done
Installing pip dependencies: ...working... Ran pip subprocess with arguments:
['/opt/conda/envs/solaris/bin/python', '-m', 'pip', 'install', '-U', '-r', '/tmp/solaris/condaenv.ezyxb95m.requirements.txt']
Pip subprocess output:
Collecting shapely-1.7.1dev
  Cloning https://github.com/Toblerity/shapely.git (to revision master) to /tmp/pip-install-abit7vwm/shapely-1-7-1dev_d81cf5406f3b4b5ea18d31c18a39ee16

failed
Pip subprocess error:
  WARNING: Generating metadata for package shapely-1.7.1dev produced metadata for project name shapely. Fix your #egg=shapely-1.7.1dev fragments.
ERROR: Requested shapely from git+https://github.com/Toblerity/shapely.git@master#egg=shapely-1.7.1dev (from -r /tmp/solaris/condaenv.ezyxb95m.requirements.txt (line 1)) has different name in metadata: 'Shapely'

CondaEnvException: Pip failed

The command '/bin/bash -c git clone https://github.com/cosmiq/solaris.git &&     cd solaris &&     git checkout ${solaris_branch} &&     conda env create -f environment-gpu.yml' returned a non-zero code: 1

Expected behavior

Expected a docker image named solaris_gpu to be available after the build visible with docker image ls.

Environment information

bartekrdz commented 3 years ago

I get the same error. Did you find a solution yet?

Environment Information: OS: Ubuntu 20.04, WSL2 with Docker Desktop for Windows Python version: 3.8.5

hhuuggoo commented 3 years ago

I think that error is because it was setup to use a dev build from the master branch of the source repo - and now that 1.7.1 of shapely is released, the version information you get from building from source is wrong. The fix is probably to install shapely from conda-forge or pypi, since 1.7.1 is out now, rather than from source.