-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://github.com/StreamHPC/pyPaSWAS.git into streamcomputing Conflicts: .gitignore
- Loading branch information
Showing
14 changed files
with
1,028 additions
and
965 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# pyPaSWAS Docker Containers | ||
|
||
This folder contains the Docker files for building Containers containing the `pyPaSWAS` software. These containers are based on Ubuntu 16.04 and come supplied with Python3 and the Nvidia CUDA software as they are based on the `nvidia/cuda:8.0-devel-ubuntu16.04` container image [supplied by Nvidia](https://hub.docker.com/r/nvidia/cuda/). | ||
|
||
## Running existing Docker Containers | ||
|
||
The Docker engine is required for running the container, see their [excellent installation instructions](https://docs.docker.com/engine/installation/) for further details. | ||
Next, these containers require low-level access to the hardware (i.e. the GPU) and therefore the use of the `nvidia-docker` utility, installation instructions are available on its [github page](https://github.com/NVIDIA/nvidia-docker/tree/2.0). | ||
|
||
`nvidia-docker run --rm -ti mkempenaar/pypaswas:nvidia-opencl_cuda8.0 bash` will download the container, start and attach to a bash session running inside the container. Here you will find the software at `/root/pyPasWAS`. Running the performance tests on a clean container is as simple as (note: this will take a while): | ||
|
||
``` | ||
cd /root/pyPaSWAS | ||
sh data/runPerformanceTests.sh | ||
``` | ||
|
||
* ## Container(s) available on [Docker Hub](https://hub.docker.com/r/mkempenaar/pypaswas/) | ||
|
||
**`mkempenaar/pypaswas:nvidia-opencl_cuda8.0` [*Docker file*](https://raw.githubusercontent.com/swarris/pyPaSWAS/master/docker/nvidia/Dockerfile)** | ||
|
||
This container can be used for testing all availabilities of the `pyPaSWAS` sequence aligner as it contains the Intel and Nvidia OpenCL runtime libraries and Nvidia CUDA support. | ||
|
||
|
||
## Building custom Docker Containers | ||
|
||
As most hardware manufacturers have their own acceleration libraries (multiple versions of OpenCL, Nvidia CUDA, etc.) the available containers might not work for your hardware. Therefore, a few custom build files are available depending on your hardware and requirements (i.e. only CUDA support or only Intel OpenCL). | ||
|
||
### Downloading and Building | ||
|
||
Cloning this repository gives the currently available Dockerfiles for building custom images which can be found in the `pyPaSWAS/docker` folder. Building a container locally can be done by going to the folder of choice (each contains a single `Dockerfile`; a container description) and running: | ||
|
||
``` | ||
docker build -t pypaswas:custom . | ||
``` | ||
|
||
Currently available: | ||
|
||
* [Intel OpenCL + Nvidia CUDA](https://raw.githubusercontent.com/swarris/pyPaSWAS/master/docker/intel/Dockerfile), `pyPaSWAS/data/docker/intel/Dockerfile`: Suitable for Intel Core and Xeon CPUs and GPUs from the 3rd generation (Ivy Bridge) and newer, combined with Nvidia CUDA from the base container image. | ||
* [Intel OpenCL + Nvidia CUDA](https://raw.githubusercontent.com/swarris/pyPaSWAS/master/docker/intel/sandybridge/Dockerfile), `pyPaSWAS/data/docker/intel/sandybridge/Dockerfile`: Only suitable for 2nd generation (Sandy Bridge) Intel Core CPUs, combined with Nvidia CUDA from the base container image. | ||
* [Intel OpenCL + Nvidia OpenCL + Nvidia CUDA](https://raw.githubusercontent.com/swarris/pyPaSWAS/master/docker/nvidia/Dockerfile), `pyPaSWAS/data/docker/nvidia/Dockerfile`: Full package for 3rd generation and newer Intel Core and Xeon CPUs and GPUs, combined with Nvidia OpenCL and CUDA support. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM nvidia/cuda:8.0-devel-ubuntu16.04 | ||
|
||
MAINTAINER Marcel Kempenaar (m.kempenaar@pl.hanze.nl) | ||
|
||
## OpenCL dependencies, runtime and development packages | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
beignet ocl-icd-opencl-dev libffi-dev clinfo && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV PATH /usr/local/cuda/bin:${PATH} | ||
ENV LD_LIBRARY_PATH /usr/local/cuda/lib:/usr/local/cuda/lib64 | ||
|
||
## Python3 and dependencies | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
python3 python3-dev python3-pip python3-setuptools git opencl-headers \ | ||
autoconf libtool pkg-config && \ | ||
ln -s /usr/bin/python3 /usr/bin/python && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN ln -s /usr/local/cuda/lib64/libOpenCL* /usr/lib/ && \ | ||
pip3 install --upgrade pip | ||
|
||
RUN pip3 install wheel | ||
|
||
RUN pip3 install numpy | ||
|
||
RUN pip3 install biopython | ||
|
||
RUN pip3 install pyopencl | ||
|
||
## pyPaSWAS installation | ||
RUN git clone https://github.com/swarris/pyPaSWAS.git /root/pyPaSWAS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
FROM nvidia/cuda:8.0-devel-ubuntu16.04 | ||
|
||
MAINTAINER Marcel Kempenaar (m.kempenaar@pl.hanze.nl) | ||
|
||
## OpenCL dependencies | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
rpm alien libnuma1 curl fakeroot libffi-dev clinfo && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
## Intel 2nd Generation OpenCL 1.2 support | ||
RUN curl http://registrationcenter-download.intel.com/akdlm/irc_nas/9019/opencl_runtime_16.1.1_x64_ubuntu_6.4.0.25.tgz | tar xz | ||
|
||
RUN cd opencl_runtime_16.1.1_x64_ubuntu_6.4.0.25/rpm && \ | ||
fakeroot alien --to-deb opencl-1.2-base-6.4.0.25-1.x86_64.rpm && \ | ||
fakeroot alien --to-deb opencl-1.2-intel-cpu-6.4.0.25-1.x86_64.rpm | ||
|
||
RUN cd opencl_runtime_16.1.1_x64_ubuntu_6.4.0.25/rpm && \ | ||
dpkg -i opencl-1.2-base_6.4.0.25-2_amd64.deb && \ | ||
dpkg -i opencl-1.2-intel-cpu_6.4.0.25-2_amd64.deb && \ | ||
rm -Rf /opencl_runtime_16.1.1_x64_ubuntu_6.4.0.25 | ||
|
||
RUN echo "/opt/intel/opencl-1.2-6.4.0.25/lib64/clinfo" > /etc/ld.so.conf.d/intelOpenCL.conf | ||
|
||
RUN mkdir -p /etc/OpenCL/vendors && \ | ||
ln /opt/intel/opencl-1.2-6.4.0.25/etc/intel64.icd /etc/OpenCL/vendors/intel64.icd && \ | ||
ldconfig | ||
|
||
ENV PATH /usr/local/cuda/bin:${PATH} | ||
ENV LD_LIBRARY_PATH /usr/local/cuda/lib:/usr/local/cuda/lib64 | ||
|
||
## Python3 and dependencies | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
python3 python3-dev python3-pip python3-setuptools git opencl-headers \ | ||
autoconf libtool pkg-config && \ | ||
ln -s /usr/bin/python3 /usr/bin/python | ||
|
||
RUN ln -s /usr/local/cuda/lib64/libOpenCL* /usr/lib/ && \ | ||
pip3 install --upgrade pip | ||
|
||
RUN pip3 install wheel | ||
|
||
RUN pip3 install numpy | ||
|
||
RUN pip3 install biopython | ||
|
||
RUN export PATH=/usr/local/cuda/bin:$PATH && pip3 install pycuda | ||
|
||
## Custom pyOpenCL installation forcing the use of version 1.2 | ||
RUN export PATH=/usr/local/cuda/bin:$PATH && \ | ||
export LD_LIBRARY_PATH=/usr/local/cuda/lib:/usr/local/cuda/lib64 && \ | ||
export LDFLAGS=-L/usr/local/cuda/lib64 && \ | ||
git clone https://github.com/pyopencl/pyopencl.git && \ | ||
cd pyopencl && python3 configure.py && \ | ||
echo 'CL_PRETEND_VERSION = "1.2"' >> siteconf.py && \ | ||
pip3 install . | ||
|
||
## pyPaSWAS installation | ||
RUN git clone https://github.com/swarris/pyPaSWAS.git /root/pyPaSWAS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM nvidia/cuda:8.0-devel-ubuntu16.04 | ||
|
||
MAINTAINER Marcel Kempenaar (m.kempenaar@pl.hanze.nl) | ||
|
||
## OpenCL dependencies, runtime and development packages | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
beignet ocl-icd-opencl-dev libffi-dev clinfo && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
## NVIDIA OpenCL support, taken from: https://gitlab.com/nvidia/opencl/blob/ubuntu14.04/runtime/Dockerfile | ||
RUN mkdir -p /etc/OpenCL/vendors && \ | ||
echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd | ||
|
||
RUN echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \ | ||
echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf | ||
|
||
ENV PATH /usr/local/cuda/bin:${PATH} | ||
ENV LD_LIBRARY_PATH /usr/local/cuda/lib:/usr/local/cuda/lib64 | ||
|
||
## Python3 and dependencies | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
python3 python3-dev python3-pip python3-setuptools git opencl-headers \ | ||
autoconf libtool pkg-config && \ | ||
ln -s /usr/bin/python3 /usr/bin/python && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN ln -s /usr/local/cuda/lib64/libOpenCL* /usr/lib/ && \ | ||
pip3 install --upgrade pip | ||
|
||
RUN pip3 install wheel | ||
|
||
RUN pip3 install numpy | ||
|
||
RUN pip3 install biopython | ||
|
||
RUN export PATH=/usr/local/cuda/bin:$PATH && pip3 install pycuda | ||
|
||
RUN pip3 install pyopencl | ||
|
||
## pyPaSWAS installation | ||
RUN git clone https://github.com/swarris/pyPaSWAS.git /root/pyPaSWAS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.