Skip to content

Support for building the Arrayfire Python Wheels #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 0 additions & 80 deletions Dockerfile

This file was deleted.

9 changes: 9 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Builders are defined in the docker-compose.yml file.

To run a particular build, do: docker-compose up <BUILDER_NAME>

The build script used is: arrayfire/scripts/build_arrayfire.sh

A directory will be created here with the build files with the form: build_<OS NAME>_arrayfire_<MKL_VERSION/openblas>_<CUDA_VERSION>

The installer can be tested by copying the installer package to the test docker in test_dockers and building (note for the CUDA back end you will need an Nvidia GPU and the CUDA docker toolkit installed).
51 changes: 0 additions & 51 deletions README.md

This file was deleted.

21 changes: 21 additions & 0 deletions arrayfire/manylinux/cuda_deps/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM af/manylinux/dependencies
MAINTAINER Christophe Murphy <christophe@arrayfire.com>

ARG AF_CUDA_MAJOR_VERSION
ARG AF_CUDA_MINOR_VERSION

RUN dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo && \
dnf clean all && \
dnf -y install cuda-toolkit-${AF_CUDA_MAJOR_VERSION}-${AF_CUDA_MINOR_VERSION} && \
dnf -y install cudnn-cuda-${AF_CUDA_MAJOR_VERSION}-${AF_CUDA_MINOR_VERSION} && \
dnf clean all

# Create Nvidia's ICD and missing standard simlinks for the CUDA driver and OpenCL
RUN mkdir -p /etc/OpenCL/vendors && \
echo "/usr/local/cuda/targets/x86_64-linux/lib/libOpenCL.so" > /etc/OpenCL/vendors/nvidia.icd && \
ldconfig && \
ln -s /usr/local/cuda-${AF_CUDA_MAJOR_VERSION}.${AF_CUDA_MINOR_VERSION}/targets/x86_64-linux/lib/stubs/libcuda.so \
/usr/local/cuda-${AF_CUDA_MAJOR_VERSION}.${AF_CUDA_MINOR_VERSION}/targets/x86_64-linux/lib/stubs/libcuda.so.1

ENV PATH=/usr/local/cuda/bin:${PATH}
ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:${LD_LIBRARY_PATH}
41 changes: 41 additions & 0 deletions arrayfire/manylinux/dependencies/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
FROM af/manylinux/dev_base
MAINTAINER Christophe Murphy <christophe@arrayfire.com>

# Boost
FROM af/manylinux/dev_base as boost
RUN cd /usr/src && \
wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz && \
tar -xvzf boost_1_87_0.tar.gz && \
cd boost_1_87_0 && \
./bootstrap.sh --prefix=/artifact && \
./b2 install && \
cd /usr/src && rm -rf boost_1_87_0*

# Doxygen
FROM af/manylinux/dev_base as doxygen
RUN cd /usr/src && \
git clone -b Release_1_13_2 https://github.com/doxygen/doxygen.git && \
cd doxygen && \
mkdir build && cd build && \
cmake -DCMAKE_INSTALL_PREFIX:PATH=/artifact .. && \
make -j$(grep -c processor /proc/cpuinfo) install && \
cd /usr/src && rm -rf doxygen

FROM af/manylinux/dev_base
MAINTAINER Christophe Murphy <christophe@arrayfire.com>

# Boost
COPY --from=boost /artifact /usr
# Doxgyen
COPY --from=doxygen /artifact /usr

# oneAPI
RUN echo $'[oneAPI]\n\
name=Intel® oneAPI repository\n\
baseurl=https://yum.repos.intel.com/oneapi\n\
enabled=1\n\
gpgcheck=1\n\
repo_gpgcheck=1\n\
gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB' > /etc/yum.repos.d/oneAPI.repo && \
cat /etc/yum.repos.d/oneAPI.repo && \
dnf -y update && dnf -y install intel-oneapi-base-toolkit && dnf clean all
29 changes: 29 additions & 0 deletions arrayfire/manylinux/dev_base/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM quay.io/pypa/manylinux_2_28_x86_64
MAINTAINER Christophe Murphy <christophe@arrayfire.com>
RUN dnf update -y && \
dnf groupinstall -y "Development Tools" && \
dnf -y install ocl-icd ocl-icd-devel opencl-headers \
wget freetype-devel fontconfig-devel \
fftw-devel openblas-devel lapack-devel \
glfw-devel graphviz graphviz-devel \
mesa-libGLU-devel freeimage-devel patchelf && \
dnf -y install gcc-toolset-10 &&\
dnf clean all


# Set location for OpenCL library
ENV OCL_ROOT=/usr
ENV OPENCL_ROOT=/usr
ENV PATH=/opt/rh/gcc-toolset-10/root/usr/bin:${PATH}
ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-10/root/usr/lib64:/opt/rh/gcc-toolset-10/root/usr/lib:/opt/rh/gcc-toolset-10/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-10/root/usr/lib/dyninst:${LD_LIBRARY_PATH}
ENV CC=/opt/rh/gcc-toolset-10/root/bin/gcc
ENV CXX=/opt/rh/gcc-toolset-10/root/bin/c++

# Ninja build system
RUN cd /usr/src && \
git clone https://github.com/ninja-build/ninja.git && \
cd ninja && \
git checkout v1.12.1 && \
./configure.py --bootstrap && \
mv ninja /usr/bin/ && \
cd .. && rm -rf ninja
7 changes: 7 additions & 0 deletions arrayfire/manylinux/wheels/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ARG AF_CUDA_MAJOR_VERSION=12
ARG AF_CUDA_MINOR_VERSION=8
FROM af/manylinux/cuda:${AF_CUDA_MAJOR_VERSION}.${AF_CUDA_MINOR_VERSION}

ARG AF_PYTHON_VERSION
ENV AF_PYTHON_VERSION=${AF_PYTHON_VERSION}
RUN dnf install -y python${AF_PYTHON_VERSION}
Loading