Describe the bug
Docker fails at installing pip packages: tables
and tensorflow
To Reproduce
Steps to reproduce the behavior:
- Download Oracle JRE available in
/resources
(/jre-8u251-linux-x64.tar.gz, the 221 version is not available)
- Run
docker build
(as mentioned in your doc)
- It will fail due to
multiprocess==0.70.7
(hangs), using multiprocess==0.70.9
to fix this
- It will fail due to
tables==3.5.2
- If I upgrade to
tables==3.6.1
, then tensorflow==1.15.1
fails
- if I remove tensorflow, then the whole install fail
I also needed to fix all the COPY
and ADD
command that were using absolute path which seens to point ti the root of the machine to put files in Docker, I changed to make sure it uses the current directory:
ADD /resources/jre-8u251-linux-x64.tar.gz /usr/local/oracle-jre8-installer-local
# becomes:
ADD ./resources/jre-8u251-linux-x64.tar.gz /usr/local/oracle-jre8-installer-local
I also download the dump (6G) and data (1.6G) before to make sure no issue happens with the download:
wget -O resources/ckg_080520.dump https://data.mendeley.com/datasets/mrcf7f4tc2/1/files/bf08667b-588f-4f40-b5fd-930f4e05368f/ckg_080520.dump?dl=1
wget -O resources/data.tar.gz https://data.mendeley.com/datasets/mrcf7f4tc2/1/files/c0d058a2-adfa-4b96-97d9-c9ec7fc5adb9/data.tar.gz?dl=1
Apart from that the Dockerfile is the same. So I am surprised that it completed for other users
The updated Dockerfile I am using can be found at https://github.com/vemonet/CKG
Expected behavior
Should manage to install pip packages that are published to Pypi
Screenshots
Error (stuck for more than 10min for 1.4MB):
Collecting more-itertools==7.0.0
Downloading more_itertools-7.0.0-py3-none-any.whl (53 kB)
Collecting multi-key-dict==2.0.3
Downloading multi_key_dict-2.0.3.tar.gz (8.4 kB)
Collecting multidict==4.5.2
Downloading multidict-4.5.2.tar.gz (105 kB)
Collecting multiprocess==0.70.7
Downloading multiprocess-0.70.7.tar.gz (1.4 MB)
Error message for tables==3.5.2
:
Collecting statsmodels==0.10.0
Downloading statsmodels-0.10.0.tar.gz (14.0 MB)
Collecting tables==3.5.2
Downloading tables-3.5.2.tar.gz (7.8 MB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-p7zeh6o_/tables/setup.py'"'"'; __file__='"'"'/tmp/pip-install-p7zeh6o_/tables/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ifcdl756
cwd: /tmp/pip-install-p7zeh6o_/tables/
Complete output (12 lines):
/tmp/H5closeqa6mg_ii.c: In function ‘main’:
/tmp/H5closeqa6mg_ii.c:2:5: warning: implicit declaration of function ‘H5close’ [-Wimplicit-function-declaration]
2 | H5close();
| ^~~~~~~
/usr/bin/ld: cannot find -lhdf5
collect2: error: ld returned 1 exit status
* Using Python 3.8.2 (default, Apr 27 2020, 15:53:34)
* USE_PKGCONFIG: True
.. ERROR:: Could not find a local HDF5 installation.
You may need to explicitly state where your local HDF5 headers and
library can be found by setting the ``HDF5_DIR`` environment
variable or by using the ``--hdf5`` command-line option.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
The command '/bin/sh -c pip3 install --ignore-installed -r requirements.txt' returned a non-zero code: 1
Issue with tensorflow when I update tables
. The issue stay with other version of tensorflow (which are available on pypi). It's complaining that it should be tensorflow 2
Collecting statsmodels==0.10.0
Downloading statsmodels-0.10.0.tar.gz (14.0 MB)
Collecting tables==3.6.1
Downloading tables-3.6.1-cp38-cp38-manylinux1_x86_64.whl (4.3 MB)
ERROR: Could not find a version that satisfies the requirement tensorflow==1.15.1 (from -r requirements.txt (line 169)) (from versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0)
ERROR: No matching distribution found for tensorflow==1.15.1 (from -r requirements.txt (line 169))
The command '/bin/sh -c pip3 install --ignore-installed -r requirements.txt' returned a non-zero code: 1
Desktop (please complete the following information):
- OS: Ubuntu 18.04
- Version:
docker version
:
Client: Docker Engine - Community
Version: 19.03.11
API version: 1.40
Go version: go1.13.10
Git commit: 42e35e61f3
Built: Mon Jun 1 09:12:22 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.11
API version: 1.40 (minimum version 1.12)
Go version: go1.13.10
Git commit: 42e35e61f3
Built: Mon Jun 1 09:10:54 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.13
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
Additional context
- I am really surprised that so many services are deployed and installed in a single Docker image
- It would be much easier and stable to separate those services in separater containers and run it using docker-compose (and use this way to install CKG for anyone)