IBM / federated-learning-lib

A library for federated learning (a distributed machine learning process) in an enterprise environment.
Other
500 stars 136 forks source link

Can not build an image from Dockerfile #97

Closed iazpiroz closed 2 years ago

iazpiroz commented 2 years ago

I try to build an image with the Dockerfile, but I obtain the following error:

executor failed running [/bin/sh -c pip3 install -q -r requirements.txt]: exit code: 1 ...

15 123.1 gensim/similarities/fastss.c:725:9: error: ‘for’ loop initial declarations are only allowed in C99 mode

15 123.1 for (WIDTH tmpi = 0; tmpi <= len_s1; tmpi++) row2[tmpi] = tmpi;

15 123.1 error: command 'gcc' failed with exit status 1

...

15 207.1 ERROR: Command errored out with exit status 1: /opt/app-root/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1vc_lczh/gensim_f69d10d382ee4212ba76a739189d3808/setup.py'"'"'; file='"'"'/tmp/pip-install-1vc_lczh/gensim_f69d10d382ee4212ba76a739189d3808/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-l0z1vmfl/install-record.txt --single-version-externally-managed --compile --install-headers /opt/app-root/include/site/python3.6/gensim Check the logs for full command output.

Could you update the requirements file to build a docker image? Thank you in advance.

chalianwar commented 2 years ago

Thanks for trying IBMFL. Could you please try following change to install gensim==3.8.3 version. It should fix the docker build.

diff --git a/requirements.txt b/requirements.txt index 427f8fe..c32a43a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,7 +26,7 @@ h5py==2.10.0 image aif360 fairlearn -gensim +gensim==3.8.3 ray dm-tree GPUtil

chalianwar commented 2 years ago

We fixed it in main repo.

iazpiroz commented 2 years ago

Many thanks @chalianwar !