-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Hello,
Still problems in building the package 😔 Now the question is: does openmm-tensorflow require a specific version for the Python and the C API of TensorFlow? Which is the TF version that you used for testing?
With version 2.11.0 of TF (python and C), if I do
import tensorflow
import openmmnn
I get
ImportError: /usr/local/lib/libtensorflow.so.2: undefined symbol: scc_info_TensorShapeProto_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto
I attach below the Dockerfile for completeness. Thanks!
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHON_VERSION=3.8
ENV TF_KIND=cpu
#ENV CUDA_HOME="/usr/local/cuda-11.8"
#ENV LD_LIBRARY_PATH="/usr/local/cuda-11.8/lib64"
ENV SFTW_FOLDER=/software
ENV ENV_NAME=obiwan-md-env
ENV CONDA_FOLDER=$SFTW_FOLDER/anaconda3
RUN apt-get update
RUN yes | apt-get install vim wget libfontconfig1 libxrender1 libxext6 nedit git cmake gcc g++
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/Miniconda3-latest-Linux-x86_64.sh
RUN mkdir $SFTW_FOLDER
RUN sh /tmp/Miniconda3-latest-Linux-x86_64.sh -b -p $CONDA_FOLDER
# makes conda command reachable
ENV PATH=$CONDA_FOLDER/bin:${PATH}
# add repos for the additional libs to be installed
RUN yes | conda config --add channels conda-forge
# create the actual execution environment
RUN yes | conda install mamba
RUN yes | mamba create -n $ENV_NAME python=$PYTHON_VERSION
# install tensorflow low level API
ENV TF_VERSION=2.11.0
RUN wget -q --no-check-certificate https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-$TF_KIND-linux-x86_64-$TF_VERSION.tar.gz
RUN tar -C /usr/local -xzf libtensorflow-$TF_KIND-linux-x86_64-$TF_VERSION.tar.gz
RUN ldconfig /usr/local/lib
# install open openmm
RUN mamba install -n $ENV_NAME openmm parmed -c conda-forge
# install open openmm-tensorflow plugin
RUN git clone https://github.com/openmm/openmm-tensorflow.git
RUN mkdir /openmm-tensorflow/build
WORKDIR /openmm-tensorflow/build
#ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.8/compat
ENV ENV_FOLDER=$CONDA_FOLDER/envs/$ENV_NAME
RUN mamba install -n $ENV_NAME swig -c conda-forge
RUN sed -i '1s/^/%include "factory.i" \n/' /openmm-tensorflow/python/openmmnn.i
COPY box_1crn_GMX.gro /tmp
COPY box_1crn_GMX.top /tmp
COPY test.py /tmp
RUN cmake .. -DPYTHON_EXECUTABLE=$ENV_FOLDER/bin/python -DSWIG_EXECUTABLE=$ENV_FOLDER/bin/swig -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$ENV_FOLDER -DOPENMM_DIR=$ENV_FOLDER -DTENSORFLOW_DIR=/usr/local
#-DCUDA_TOOLKIT_ROOT_DIR=$CUDA_HOME \
#-DNN_BUILD_CUDA_LIB=ON
RUN make
RUN make install
RUN make PythonInstall
RUN mamba install -n $ENV_NAME tensorflow==$TF_VERSION
ENV DEBIAN_FRONTEND=interactive
WORKDIR /
CMD bash
# the conda environment has to be activated manually
Metadata
Metadata
Assignees
Labels
No labels