Skip to content

Commit

Permalink
Modified requirements (remove tf dependency), added pytorch one, crea…
Browse files Browse the repository at this point in the history
…ted a Dockerfile for CUDA 10.1 and updated the README accordingly
  • Loading branch information
k4ntz committed Oct 22, 2020
1 parent ec24456 commit 8185023
Show file tree
Hide file tree
Showing 50 changed files with 22 additions and 159 deletions.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions .tox/log/GLOB-0.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
action: GLOB, msg: packaging
cwd: /home/quentin/Documents/prauper
cmd: /usr/bin/python3 setup.py sdist --formats=zip --dist-dir /home/quentin/Documents/prauper/.tox/dist
running sdist
running egg_info
error: [Errno 13] Permission denied
133 changes: 5 additions & 128 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,129 +1,6 @@
# syntax = docker/dockerfile:experimental
ARG ROCM_VERSION=3.7
ARG BASE_CUDA_VERSION=10.1
ARG GPU_IMAGE=nvidia/cuda:${BASE_CUDA_VERSION}-devel-centos7
FROM centos:7 as base
FROM nvidia/cuda:10.2-devel

ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8

RUN yum install -y wget curl perl util-linux xz bzip2 git patch which perl
RUN yum install -y yum-utils centos-release-scl
RUN yum-config-manager --enable rhel-server-rhscl-7-rpms
RUN yum install -y devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-gcc-gfortran devtoolset-7-binutils
ENV PATH=/opt/rh/devtoolset-7/root/usr/bin:$PATH
ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-7/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib:$LD_LIBRARY_PATH

RUN wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
rpm -ivh epel-release-latest-7.noarch.rpm && \
rm -f epel-release-latest-7.noarch.rpm

# cmake
RUN yum install -y cmake3 && \
ln -s /usr/bin/cmake3 /usr/bin/cmake

RUN yum install -y autoconf aclocal automake make

FROM base as python
# build python
COPY manywheel/build_scripts /build_scripts
RUN bash build_scripts/build.sh && rm -r build_scripts

# remove unncessary python versions
RUN rm -rf /opt/python/cp26-cp26m /opt/_internal/cpython-2.6.9-ucs2
RUN rm -rf /opt/python/cp26-cp26mu /opt/_internal/cpython-2.6.9-ucs4
RUN rm -rf /opt/python/cp33-cp33m /opt/_internal/cpython-3.3.6
RUN rm -rf /opt/python/cp34-cp34m /opt/_internal/cpython-3.4.6

FROM base as cuda
ARG BASE_CUDA_VERSION=10.1
# Install CUDA
ADD ./common/install_cuda.sh install_cuda.sh
RUN bash ./install_cuda.sh ${BASE_CUDA_VERSION} && rm install_cuda.sh

FROM base as intel
# MKL
ADD ./common/install_mkl.sh install_mkl.sh
RUN bash ./install_mkl.sh && rm install_mkl.sh

# EPEL for cmake
FROM base as patchelf
# Install patchelf
ADD ./common/install_patchelf.sh install_patchelf.sh
RUN bash ./install_patchelf.sh && rm install_patchelf.sh
RUN cp $(which patchelf) /patchelf

FROM base as magma
ARG BASE_CUDA_VERSION=10.1
# Install magma
ADD ./common/install_magma.sh install_magma.sh
RUN bash ./install_magma.sh ${BASE_CUDA_VERSION} && rm install_magma.sh

FROM base as jni
# Install java jni header
ADD ./common/install_jni.sh install_jni.sh
ADD ./java/jni.h jni.h
RUN bash ./install_jni.sh && rm install_jni.sh

FROM ${GPU_IMAGE} as common
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
RUN yum install -y \
aclocal \
autoconf \
automake \
bison \
bzip2 \
curl \
diffutils \
file \
git \
make \
patch \
perl \
unzip \
util-linux \
wget \
which \
xz \
yasm \

ENV SSL_CERT_FILE=/opt/_internal/certs.pem
COPY --from=python /opt/python /opt/python
COPY --from=python /opt/_internal /opt/_internal
COPY --from=python /opt/python/cp36-cp36m/bin/auditwheel /usr/local/bin/auditwheel
COPY --from=intel /opt/intel /opt/intel
COPY --from=patchelf /usr/local/bin/patchelf /usr/local/bin/patchelf
COPY --from=jni /usr/local/include/jni.h /usr/local/include/jni.h

FROM common as cuda_final
ARG BASE_CUDA_VERSION=10.1
RUN yum install -y yum-utils centos-release-scl
RUN yum-config-manager --enable rhel-server-rhscl-7-rpms
RUN yum install -y devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-gcc-gfortran devtoolset-7-binutils
ENV PATH=/opt/rh/devtoolset-7/root/usr/bin:$PATH
ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-7/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib:$LD_LIBRARY_PATH

RUN wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
rpm -ivh epel-release-latest-7.noarch.rpm && \
rm -f epel-release-latest-7.noarch.rpm

# cmake
RUN yum install -y cmake3 && \
ln -s /usr/bin/cmake3 /usr/bin/cmake

RUN rm -rf /usr/local/cuda-${BASE_CUDA_VERSION}
COPY --from=cuda /usr/local/cuda-${BASE_CUDA_VERSION} /usr/local/cuda-${BASE_CUDA_VERSION}
COPY --from=magma /usr/local/cuda-${BASE_CUDA_VERSION} /usr/local/cuda-${BASE_CUDA_VERSION}

FROM common as rocm_final
ARG ROCM_VERSION=3.7
# Install ROCm
ADD ./common/install_rocm.sh install_rocm.sh
RUN bash ./install_rocm.sh ${ROCM_VERSION} && rm install_rocm.sh
# cmake is already installed inside the rocm base image, but both 2 and 3 exist
RUN yum install -y cmake3 && \
rm -f /usr/bin/cmake && \
ln -s /usr/bin/cmake3 /usr/bin/cmake
RUN apt-get update -y && apt-get install -y python3-pip
RUN pip3 install -U pip
RUN pip3 install wheel
RUN pip3 install pau
24 changes: 0 additions & 24 deletions Dockerfile_save

This file was deleted.

File renamed without changes.
14 changes: 11 additions & 3 deletions src/README.md → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,21 @@ And, therefore relieves the network designer of having to commit to a potentiall
## 2. Dependencies
PyTorch>=1.1.0
CUDA>=10.1
airspeed>=0.5.11

## 3. Installation

PAU is implemented as a pytorch extension using CUDA 10.1 or CUDA 10.2. So all that is needed is to install the extension.
PAU is implemented as a pytorch extension using CUDA 10.2. So all that is needed is to install the extension.

# pip install pau
pip3 install --upgrade pip
pip3 install pau

If installation does not work, please run:

pip3 install wheel

For CUDA 10.1, download the wheel corresponding to your python3 version in the _wheelhouse_ repo and install it with:

pip3 install pau-0.0.16-101-cp{your_version}-manylinux2014_x86_64.whl

If you encounter any trouble installing pau, please contact [this person]([email protected]).

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added dist/pau-0.0.16-cp36-cp36m-linux_x86_64.whl
Binary file not shown.
Binary file added dist/pau-0.0.16-cp37-cp37m-linux_x86_64.whl
Binary file not shown.
Binary file added dist/pau-0.0.16-cp38-cp38-linux_x86_64.whl
Binary file not shown.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion src/requirements.txt → requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
torch>=1.4.0
tensorflow==2.3.1
airspeed==0.5.16
scipy==1.5.0
numpy==1.18.5
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions src/.tox/log/GLOB-0.log

This file was deleted.

File renamed without changes.

0 comments on commit 8185023

Please sign in to comment.