You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to build an apptainer/singularity container with vina-gpu2.1, but it fails because certain files from boost can't be found. I tried this on my local computer (which is the .def file I provided) and on a HPC with boost and cuda modules, but neither work.
gcc -o AutoDock-Vina-GPU-2-1 -I/root/boost_1_84_0 -I/root/boost_1_84_0/boost -I/opt/autodock-vina/AutoDock-Vina-GPU-2.1/lib -I/opt/autodock-vina/AutoDock-Vina-GPU-2.1/OpenCL/inc -I/usr/local/cuda/include ./main/main.cpp -O3 ./lib/*.cpp ./OpenCL/src/wrapcl.cpp /root/boost_1_84_0/libs/thread/src/pthread/thread.cpp /root/boost_1_84_0/libs/thread/src/pthread/once.cpp -lboost_program_options -lboost_system -lboost_filesystem -lOpenCL -lstdc++ -lstdc++fs -lm -lpthread -L/root/boost_1_84_0/stage/lib -L/usr/local/cuda/lib64 -DOPENCL_3_0 -DNVIDIA_PLATFORM -DSMALL_BOX -DBOOST_TIMER_ENABLE_DEPRECATED -DNDEBUG -DBUILD_KERNEL_FROM_SOURCE
./main/main.cpp:28:10: fatal error: boost/program_options.hpp: No such file or directory
28 | #include <boost/program_options.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
./lib/cache.cpp:32:18: fatal error: boost/archive/text_oarchive.hpp: No such file or directory
32 | #include <boost/archive/text_oarchive.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./lib/coords.h:26,
from ./lib/coords.cpp:23:
./lib/conf.h:26:10: fatal error: boost/ptr_container/ptr_vector.hpp: No such file or directory
26 | #include <boost/ptr_container/ptr_vector.hpp> // typedef output_container
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./lib/current_weights.h:26,
from ./lib/current_weights.cpp:23:
./lib/terms.h:26:10: fatal error: boost/ptr_container/ptr_vector.hpp: No such file or directory
26 | #include <boost/ptr_container/ptr_vector.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./lib/everything.h:26,
from ./lib/everything.cpp:23:
./lib/terms.h:26:10: fatal error: boost/ptr_container/ptr_vector.hpp: No such file or directory
26 | #include <boost/ptr_container/ptr_vector.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./lib/array3d.h:27,
from ./lib/grid.h:26,
from ./lib/grid.cpp:23:
./lib/common.h:39:10: fatal error: boost/serialization/vector.hpp: No such file or directory
39 | #include <boost/serialization/vector.hpp> // can't come before the above two - wart fixed in upcoming Boost versions
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./lib/igrid.h:26,
from ./lib/cache.h:27,
from ./lib/main_procedure_cl.cpp:1:
./lib/common.h:39:10: fatal error: boost/serialization/vector.hpp: No such file or directory
39 | #include <boost/serialization/vector.hpp> // can't come before the above two - wart fixed in upcoming Boost versions
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./lib/ssd.h:35,
from ./lib/manifold.h:28,
from ./lib/manifold.cpp:23:
./lib/model.h:26:10: fatal error: boost/optional.hpp: No such file or directory
26 | #include <boost/optional.hpp> // for context
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./lib/model.cpp:23:
./lib/model.h:26:10: fatal error: boost/optional.hpp: No such file or directory
26 | #include <boost/optional.hpp> // for context
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./lib/ssd.h:35,
from ./lib/monte_carlo.h:26,
from ./lib/monte_carlo.cpp:23:
./lib/model.h:26:10: fatal error: boost/optional.hpp: No such file or directory
26 | #include <boost/optional.hpp> // for context
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./lib/mutate.h:26,
from ./lib/mutate.cpp:23:
./lib/model.h:26:10: fatal error: boost/optional.hpp: No such file or directory
26 | #include <boost/optional.hpp> // for context
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./lib/igrid.h:26,
from ./lib/naive_non_cache.h:26,
from ./lib/naive_non_cache.cpp:23:
./lib/common.h:39:10: fatal error: boost/serialization/vector.hpp: No such file or directory
39 | #include <boost/serialization/vector.hpp> // can't come before the above two - wart fixed in upcoming Boost versions
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./lib/igrid.h:26,
from ./lib/non_cache.h:26,
from ./lib/non_cache.cpp:23:
./lib/common.h:39:10: fatal error: boost/serialization/vector.hpp: No such file or directory
39 | #include <boost/serialization/vector.hpp> // can't come before the above two - wart fixed in upcoming Boost versions
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./lib/parallel.h:28,
from ./lib/parallel_mc.cpp:23:
./lib/common.h:39:10: fatal error: boost/serialization/vector.hpp: No such file or directory
39 | #include <boost/serialization/vector.hpp> // can't come before the above two - wart fixed in upcoming Boost versions
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./lib/parallel_progress.cpp:25:
./lib/parallel_progress.h:26:10: fatal error: boost/progress.hpp: No such file or directory
26 | #include <boost/progress.hpp>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
./lib/parse_pdbqt.cpp:26:10: fatal error: boost/utility.hpp: No such file or directory
26 | #include <boost/utility.hpp> // for noncopyable
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./lib/pdb.h:26,
from ./lib/pdb.cpp:23:
./lib/common.h:39:10: fatal error: boost/serialization/vector.hpp: No such file or directory
39 | #include <boost/serialization/vector.hpp> // can't come before the above two - wart fixed in upcoming Boost versions
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./lib/quasi_newton.h:26,
from ./lib/quasi_newton.cpp:23:
./lib/model.h:26:10: fatal error: boost/optional.hpp: No such file or directory
26 | #include <boost/optional.hpp> // for context
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./lib/quaternion.cpp:23:
./lib/quaternion.h:26:10: fatal error: boost/math/quaternion.hpp: No such file or directory
26 | #include <boost/math/quaternion.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./lib/random.cpp:25:
./lib/random.h:26:10: fatal error: boost/random.hpp: No such file or directory
26 | #include <boost/random.hpp>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./lib/ssd.h:35,
from ./lib/ssd.cpp:23:
./lib/model.h:26:10: fatal error: boost/optional.hpp: No such file or directory
26 | #include <boost/optional.hpp> // for context
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./lib/szv_grid.h:26,
from ./lib/szv_grid.cpp:23:
./lib/model.h:26:10: fatal error: boost/optional.hpp: No such file or directory
26 | #include <boost/optional.hpp> // for context
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./lib/terms.cpp:23:
./lib/terms.h:26:10: fatal error: boost/ptr_container/ptr_vector.hpp: No such file or directory
26 | #include <boost/ptr_container/ptr_vector.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./lib/weighted_terms.h:26,
from ./lib/weighted_terms.cpp:23:
./lib/terms.h:26:10: fatal error: boost/ptr_container/ptr_vector.hpp: No such file or directory
26 | #include <boost/ptr_container/ptr_vector.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /opt/autodock-vina/AutoDock-Vina-GPU-2.1/OpenCL/inc/wrapcl.h:2,
from ./OpenCL/src/wrapcl.cpp:1:
/opt/autodock-vina/AutoDock-Vina-GPU-2.1/OpenCL/inc/commonMacros.h:13:18: fatal error: CL/opencl.h: No such file or directory
13 | #include "CL/opencl.h"
| ^~~~~~~~~~~~~
compilation terminated.
cc1plus: fatal error: /root/boost_1_84_0/libs/thread/src/pthread/thread.cpp: No such file or directory
compilation terminated.
cc1plus: fatal error: /root/boost_1_84_0/libs/thread/src/pthread/once.cpp: No such file or directory
compilation terminated.
make: *** [Makefile:23: source] Error 1
This is my .def file:
Bootstrap: docker
From: python:3.9-slim
%environment
export CUDA_PATH=/usr/local/cuda
export PATH=/usr/local/cuda/bin:$PATH
export CPATH=/usr/local/cuda/include:$CPATH
export LIBRARY_PATH=/usr/local/cuda/lib64:$LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
export CUDA_INCLUDE_PATH=$CUDA_PATH/include
export CUDA_LIB_PATH=$CUDA_PATH/lib64
export OPENCL_LIB_PATH=$CUDA_PATH/lib64
export LD_LIBRARY_PATH=$BOOST_LIB_PATH:$OPENCL_LIB_PATH:$LD_LIBRARY_PATH
export PATH=/opt/autodock-vina/quickvina2-gpu:$PATH
export PYTHONPATH=/usr/local/lib/python3.9/site-packages:$PYTHONPATH
%post
# Set working directory
mkdir -p /app
export DEBIAN_FRONTEND=noninteractive
# Update and install packages
apt-get update && apt-get install -y \
wget \
curl \
unzip \
cmake \
ca-certificates \
git \
build-essential \
vim \
#libboost-all-dev \
lsb-release && \
rm -rf /var/lib/apt/lists/*
# Clone the AutoDock Vina GPU repository
git clone https://github.com/DeltaGroupNJUPT/Vina-GPU-2.1.git /opt/autodock-vina
echo "Cloned AutoDock Vina. Current directory: $PWD"
# Go into the AutoDock-Vina-GPU-2.1 directory
cd /opt/autodock-vina/AutoDock-Vina-GPU-2.1
echo "Changed directory to /opt/autodock-vina/AutoDock-Vina-GPU-2.1. Current directory: $PWD"
chmod +x /opt/autodock-vina/AutoDock-Vina-GPU-2.1
wget https://boostorg.jfrog.io/artifactory/main/release/1.84.0/source/boost_1_84_0.tar.gz
tar -xvzf boost_1_84_0.tar.gz
cd boost_1_84_0
./bootstrap.sh --prefix=$HOME/boost_1_84_0
./b2 install
# Set Boost environment variables
export BOOST_ROOT=$HOME/boost_1_84_0
# Set Boost environment variables
#export BOOST_ROOT=/usr/lib/x86_64-linux-gnu
#export BOOST_ROOT=/apps/arch/2024r1/software/linux-rhel8-cascadelake/gcc-11.3.0/boost-1.83.0-zopo3kmij4kawnp4yx2gh4pqheedk426
export BOOST_LIB_PATH=$BOOST_ROOT/lib
export BOOST_INCLUDE_PATH=$BOOST_ROOT/include
# Set CUDA environment variables
export CUDA_PATH=/usr/local/cuda
export CPATH=/usr/local/cuda/include:$CPATH
export LIBRARY_PATH=/usr/local/cuda/lib64:$LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
# Additional environment variables for CUDA
export CUDA_INCLUDE_PATH=$CUDA_PATH/include
export CUDA_LIB_PATH=$CUDA_PATH/lib64
#export OPENCL_LIB_PATH=$CUDA_PATH/lib64
export OPENCL_LIB_PATH=$CUDA_PATH
# Set LD_LIBRARY_PATH to include Boost and CUDA libraries
export LD_LIBRARY_PATH=$BOOST_LIB_PATH:$OPENCL_LIB_PATH:$LD_LIBRARY_PATH
echo "Environment variables set. Current directory: $PWD"
# Check if the directory exists and print its contents
echo "Checking if directory /opt/autodock-vina/AutoDock-Vina-GPU-2.1 exists..."
if [ -d "/opt/autodock-vina/AutoDock-Vina-GPU-2.1" ]; then
echo "Directory exists."
ls -l /opt/autodock-vina/AutoDock-Vina-GPU-2.1
else
echo "Error: Directory does not exist!"
exit 1
fi
# Try to change into the directory again
cd /opt/autodock-vina/AutoDock-Vina-GPU-2.1
echo "Changed directory again. Current directory: $PWD"
# Modify the Makefile to use the correct paths for Boost and OpenCL
sed -i "s|BOOST_LIB_PATH=.*|BOOST_LIB_PATH=${BOOST_ROOT}|" Makefile
#sed -i "s|BOOST_INCLUDE_PATH=.*|BOOST_INCLUDE_PATH=${BOOST_INCLUDE_PATH}|" Makefile
sed -i "s|OPENCL_LIB_PATH=.*|OPENCL_LIB_PATH=${OPENCL_LIB_PATH}|" Makefile
sed -i "s|GPU_PLATFORM=.*|GPU_PLATFORM=-DNVIDIA_PLATFORM|" Makefile
sed -i "s|OPENCL_VERSION=.*|OPENCL_VERSION=-DOPENCL_3_0|" Makefile
sed -i "s|WORK_DIR=.*|WORK_DIR=${PWD}|" Makefile
cat Makefile
# Build AutoDock Vina GPU
make clean
make source
%runscript
# The default command to run when the container is executed
exec "$@"
%labels
Author "Tim Holtgrefe"
Version "1.0"
Description "Apptainer container with PIPSA, APBS and pdb2pqr"
The text was updated successfully, but these errors were encountered:
I tried to build an apptainer/singularity container with vina-gpu2.1, but it fails because certain files from boost can't be found. I tried this on my local computer (which is the .def file I provided) and on a HPC with boost and cuda modules, but neither work.
This is my .def file:
The text was updated successfully, but these errors were encountered: