openmm / openmm-tensorflow

OpenMM plugin to define forces with neural networks
31 stars 6 forks source link

No rule to make target 'PythonInstall' #19

Open virtualmartire opened 7 months ago

virtualmartire commented 7 months ago

I'm arrived at the end of the installation, but when I do make PythonInstall the terminal says

make: *** No rule to make target 'PythonInstall'.  Stop.

Where am I wrong?

virtualmartire commented 7 months ago

I am using this Dockerfile:

FROM nvidia/cuda:11.8.0-devel-ubuntu18.04

# assumes python 3.9, TF=2.11, cuda

COPY Miniconda3-latest-Linux-x86_64.sh /tmp/

ENV TF_VERSION=2.11.0
ENV KERAS_VERSION=2.11
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=ml_env
ENV CONDA_FOLDER=$SFTW_FOLDER/anaconda3

RUN apt-get update
RUN yes | apt-get install vim wget libfontconfig1 libxrender1 libxext6 nedit

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=3.9
# this will allow to build also in a machine without gpu
RUN CONDA_OVERRIDE_CUDA="11.8" mamba install -n $ENV_NAME tensorflow-gpu=$TF_VERSION -c conda-forge
#RUN CONDA_OVERRIDE_CUDA="11.8" mamba install -n $ENV_NAME keras=$KERAS_VERSION -c conda-forge
RUN mamba install -n $ENV_NAME numpy=1.23.5
RUN mamba install -n $ENV_NAME pandas=1.5.2
RUN mamba install -n $ENV_NAME matplotlib=3.6.2
RUN mamba install -n $ENV_NAME scikit-learn=1.1.3

# install tensorflow low level API 
RUN wget -q --no-check-certificate https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-$TF_VERSION.tar.gz
RUN tar -C /usr/local -xzf libtensorflow-gpu-linux-x86_64-$TF_VERSION.tar.gz

# install open openmm 
RUN mamba install -n $ENV_NAME openmm -c conda-forge

# install open openmm-tensorflow plugin
RUN yes | apt-get install git
RUN yes | apt-get install cmake
RUN git clone https://github.com/openmm/openmm-tensorflow.git
WORKDIR openmm-tensorflow
RUN mkdir ./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 cmake .. -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
CMD bash
peastman commented 7 months ago

Check in CMake to see if building the Python wrapper is turned off? The variable is NN_BUILD_PYTHON_WRAPPERS. If it's turned off, it might mean CMake wasn't able to locate Python.