Python 3.7.5-slim-strech, установка таблиц и поиск ошибок hdf5 hdf install - PullRequest
1 голос
/ 22 октября 2019

В настоящее время строит образ:

FROM python:3.7-slim-stretch

WORKDIR /root/forstack-host

COPY requirements.txt /root/requirements.txt

RUN apt-get update && apt-get install -y libgomp1 gcc
RUN apt-get install -y libpq-dev
RUN apt-get install net-tools
RUN apt-get install -y libhdf5-serial-dev hdf5-tools

RUN python3 -m pip install --no-cache-dir -U pip && \
  python3 -m pip install  --no-cache-dir -r /root/requirements.txt

При установке таблиц = 3.4.4 я получаю сообщение об ошибке

ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-91revz2s/tables/setup.py'"'"'; __file__='"'"'/tmp/pip-install-91revz2s/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-install-91revz2s/tables/pip-egg-info
         cwd: /tmp/pip-install-91revz2s/tables/
    Complete output (12 lines):
    /tmp/H5close9pyniq85.c: In function ‘main’:
    /tmp/H5close9pyniq85.c:2:5: warning: implicit declaration of function ‘H5close’ [-Wimplicit-function-declaration]
         H5close();
         ^~~~~~~
    /usr/bin/ld: cannot find -lhdf5
    collect2: error: ld returned 1 exit status
    * Using Python 3.7.5 (default, Oct 19 2019, 00:03:48)
    * 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.

Использование RUN apt-get install -y libhdf5-serial-dev hdf5-tools, похоже, не исправляет эту ошибку иЯ не могу установить HDF5_DIR env. Есть ли работающее 3.7 изображение с исправлением для этой проблемы hdf5?

1 Ответ

0 голосов
/ 22 октября 2019

вы можете попробовать добавить этот ARG в Dockerfile перед установкой:

ARG HDF5_DIR=PATH_TO_YOUR_HDF5 # normally should be in /usr/local or /opt/local

вам также может понадобиться установить build-dep

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...