diff --git a/src/.tox/.package.lock b/.tox/.package.lock similarity index 100% rename from src/.tox/.package.lock rename to .tox/.package.lock diff --git a/src/.tox/log/.lock b/.tox/log/.lock similarity index 100% rename from src/.tox/log/.lock rename to .tox/log/.lock diff --git a/.tox/log/GLOB-0.log b/.tox/log/GLOB-0.log new file mode 100644 index 0000000..f7dca84 --- /dev/null +++ b/.tox/log/GLOB-0.log @@ -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 diff --git a/Dockerfile b/Dockerfile index 106ebc2..22cdfda 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/Dockerfile_save b/Dockerfile_save deleted file mode 100644 index 532fd9a..0000000 --- a/Dockerfile_save +++ /dev/null @@ -1,24 +0,0 @@ -FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu16.04 -RUN apt-get update && apt-get install -y --no-install-recommends \ - build-essential \ - cmake \ - git \ - curl \ - ca-certificates \ - libjpeg-dev \ - libpng-dev && \ - rm -rf /var/lib/apt/lists/* - -#RUN curl -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda3-4.5.11-Linux-x86_64.sh && \ -# chmod +x ~/miniconda.sh && ~/miniconda.sh -b -p /opt/conda && rm ~/miniconda.sh - -#RUN /opt/conda/bin/conda update -y conda -#RUN /opt/conda/bin/conda clean -ya - -#ENV PATH /opt/conda/bin:$PATH - -#RUN conda create -y -n condaenv36 python=3.6 pytorch -#RUN conda create -y -n condaenv37 python=3.7 pytorch -#RUN conda create -y -n condaenv38 python=3.8 pytorch - -#RUN conda init bash diff --git a/src/MANIFEST.in b/MANIFEST.in similarity index 100% rename from src/MANIFEST.in rename to MANIFEST.in diff --git a/src/README.md b/README.md similarity index 80% rename from src/README.md rename to README.md index 6f49253..c4f1cec 100644 --- a/src/README.md +++ b/README.md @@ -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](quentin.delfosse@cs.tu-darmstadt.de). diff --git a/src/cuda/pau_cuda.cpp b/cuda/pau_cuda.cpp similarity index 100% rename from src/cuda/pau_cuda.cpp rename to cuda/pau_cuda.cpp diff --git a/src/cuda/pau_cuda_kernels.cu b/cuda/pau_cuda_kernels.cu similarity index 100% rename from src/cuda/pau_cuda_kernels.cu rename to cuda/pau_cuda_kernels.cu diff --git a/src/cuda/versions/A.cu b/cuda/versions/A.cu similarity index 100% rename from src/cuda/versions/A.cu rename to cuda/versions/A.cu diff --git a/src/cuda/versions/B.cu b/cuda/versions/B.cu similarity index 100% rename from src/cuda/versions/B.cu rename to cuda/versions/B.cu diff --git a/src/cuda/versions/C.cu b/cuda/versions/C.cu similarity index 100% rename from src/cuda/versions/C.cu rename to cuda/versions/C.cu diff --git a/src/cuda/versions/D.cu b/cuda/versions/D.cu similarity index 100% rename from src/cuda/versions/D.cu rename to cuda/versions/D.cu diff --git a/dist/pau-0.0.16-cp36-cp36m-linux_x86_64.whl b/dist/pau-0.0.16-cp36-cp36m-linux_x86_64.whl new file mode 100644 index 0000000..4a0d15e Binary files /dev/null and b/dist/pau-0.0.16-cp36-cp36m-linux_x86_64.whl differ diff --git a/dist/pau-0.0.16-cp37-cp37m-linux_x86_64.whl b/dist/pau-0.0.16-cp37-cp37m-linux_x86_64.whl new file mode 100644 index 0000000..4c954e9 Binary files /dev/null and b/dist/pau-0.0.16-cp37-cp37m-linux_x86_64.whl differ diff --git a/dist/pau-0.0.16-cp38-cp38-linux_x86_64.whl b/dist/pau-0.0.16-cp38-cp38-linux_x86_64.whl new file mode 100644 index 0000000..fbe6d8d Binary files /dev/null and b/dist/pau-0.0.16-cp38-cp38-linux_x86_64.whl differ diff --git a/src/images/results.png b/images/results.png similarity index 100% rename from src/images/results.png rename to images/results.png diff --git a/src/pau/Constants.py b/pau/Constants.py similarity index 100% rename from src/pau/Constants.py rename to pau/Constants.py diff --git a/src/pau/__init__.py b/pau/__init__.py similarity index 100% rename from src/pau/__init__.py rename to pau/__init__.py diff --git a/src/pau/find_init_weights.py b/pau/find_init_weights.py similarity index 100% rename from src/pau/find_init_weights.py rename to pau/find_init_weights.py diff --git a/src/pau/paus_config.json b/pau/paus_config.json similarity index 100% rename from src/pau/paus_config.json rename to pau/paus_config.json diff --git a/src/pau/paus_py.py b/pau/paus_py.py similarity index 100% rename from src/pau/paus_py.py rename to pau/paus_py.py diff --git a/src/pau/utils.py b/pau/utils.py similarity index 100% rename from src/pau/utils.py rename to pau/utils.py diff --git a/src/pau_keras/__init__.py b/pau_keras/__init__.py similarity index 100% rename from src/pau_keras/__init__.py rename to pau_keras/__init__.py diff --git a/src/pau_keras/pade_activation_unit.py b/pau_keras/pade_activation_unit.py similarity index 100% rename from src/pau_keras/pade_activation_unit.py rename to pau_keras/pade_activation_unit.py diff --git a/src/pau_keras/pade_keras_functions.py b/pau_keras/pade_keras_functions.py similarity index 100% rename from src/pau_keras/pade_keras_functions.py rename to pau_keras/pade_keras_functions.py diff --git a/src/pau_keras/test_tfkeras.py b/pau_keras/test_tfkeras.py similarity index 100% rename from src/pau_keras/test_tfkeras.py rename to pau_keras/test_tfkeras.py diff --git a/src/pau_torch/__init__.py b/pau_torch/__init__.py similarity index 100% rename from src/pau_torch/__init__.py rename to pau_torch/__init__.py diff --git a/src/pau_torch/pade_activation_unit.py b/pau_torch/pade_activation_unit.py similarity index 100% rename from src/pau_torch/pade_activation_unit.py rename to pau_torch/pade_activation_unit.py diff --git a/src/pau_torch/pade_cuda_functions.py b/pau_torch/pade_cuda_functions.py similarity index 100% rename from src/pau_torch/pade_cuda_functions.py rename to pau_torch/pade_cuda_functions.py diff --git a/src/pau_torch/pade_pytorch_functions.py b/pau_torch/pade_pytorch_functions.py similarity index 100% rename from src/pau_torch/pade_pytorch_functions.py rename to pau_torch/pade_pytorch_functions.py diff --git a/src/pau_torch/test_torch.py b/pau_torch/test_torch.py similarity index 100% rename from src/pau_torch/test_torch.py rename to pau_torch/test_torch.py diff --git a/src/pypi_build_scripts/compile_all.sh b/pypi_build_scripts/compile_all.sh similarity index 100% rename from src/pypi_build_scripts/compile_all.sh rename to pypi_build_scripts/compile_all.sh diff --git a/src/pypi_build_scripts/complete_wheel_repair.sh b/pypi_build_scripts/complete_wheel_repair.sh similarity index 100% rename from src/pypi_build_scripts/complete_wheel_repair.sh rename to pypi_build_scripts/complete_wheel_repair.sh diff --git a/src/pypi_build_scripts/install_all_python.sh b/pypi_build_scripts/install_all_python.sh similarity index 100% rename from src/pypi_build_scripts/install_all_python.sh rename to pypi_build_scripts/install_all_python.sh diff --git a/src/pypi_build_scripts/make_manylinux.sh b/pypi_build_scripts/make_manylinux.sh similarity index 100% rename from src/pypi_build_scripts/make_manylinux.sh rename to pypi_build_scripts/make_manylinux.sh diff --git a/src/pytest.ini b/pytest.ini similarity index 100% rename from src/pytest.ini rename to pytest.ini diff --git a/src/requirements.txt b/requirements.txt similarity index 80% rename from src/requirements.txt rename to requirements.txt index ae1a25e..7717fcd 100644 --- a/src/requirements.txt +++ b/requirements.txt @@ -1,5 +1,4 @@ torch>=1.4.0 -tensorflow==2.3.1 airspeed==0.5.16 scipy==1.5.0 numpy==1.18.5 diff --git a/src/scripts/install_hooks.sh b/scripts/install_hooks.sh similarity index 100% rename from src/scripts/install_hooks.sh rename to scripts/install_hooks.sh diff --git a/src/scripts/pre-commit.sh b/scripts/pre-commit.sh similarity index 100% rename from src/scripts/pre-commit.sh rename to scripts/pre-commit.sh diff --git a/src/scripts/pre_commit_test.sh b/scripts/pre_commit_test.sh similarity index 100% rename from src/scripts/pre_commit_test.sh rename to scripts/pre_commit_test.sh diff --git a/src/setup.py b/setup.py similarity index 100% rename from src/setup.py rename to setup.py diff --git a/src/.tox/log/GLOB-0.log b/src/.tox/log/GLOB-0.log deleted file mode 100644 index b68a7b0..0000000 --- a/src/.tox/log/GLOB-0.log +++ /dev/null @@ -1,3 +0,0 @@ -action: GLOB, msg: packaging -cwd: /prauper_src -cmd: /usr/local/bin/python3.8 setup.py sdist --formats=zip --dist-dir /prauper_src/.tox/dist diff --git a/src/tox.ini b/tox.ini similarity index 100% rename from src/tox.ini rename to tox.ini diff --git a/src/wheelhouse/pau-0.0.16-101-cp36-cp36m-manylinux2014_x86_64.whl b/wheelhouse/pau-0.0.16-101-cp36-cp36m-manylinux2014_x86_64.whl similarity index 100% rename from src/wheelhouse/pau-0.0.16-101-cp36-cp36m-manylinux2014_x86_64.whl rename to wheelhouse/pau-0.0.16-101-cp36-cp36m-manylinux2014_x86_64.whl diff --git a/src/wheelhouse/pau-0.0.16-101-cp37-cp37m-manylinux2014_x86_64.whl b/wheelhouse/pau-0.0.16-101-cp37-cp37m-manylinux2014_x86_64.whl similarity index 100% rename from src/wheelhouse/pau-0.0.16-101-cp37-cp37m-manylinux2014_x86_64.whl rename to wheelhouse/pau-0.0.16-101-cp37-cp37m-manylinux2014_x86_64.whl diff --git a/src/wheelhouse/pau-0.0.16-101-cp38-cp38-manylinux2014_x86_64.whl b/wheelhouse/pau-0.0.16-101-cp38-cp38-manylinux2014_x86_64.whl similarity index 100% rename from src/wheelhouse/pau-0.0.16-101-cp38-cp38-manylinux2014_x86_64.whl rename to wheelhouse/pau-0.0.16-101-cp38-cp38-manylinux2014_x86_64.whl diff --git a/src/wheelhouse/pau-0.0.16-102-cp36-cp36m-manylinux2014_x86_64.whl b/wheelhouse/pau-0.0.16-102-cp36-cp36m-manylinux2014_x86_64.whl similarity index 100% rename from src/wheelhouse/pau-0.0.16-102-cp36-cp36m-manylinux2014_x86_64.whl rename to wheelhouse/pau-0.0.16-102-cp36-cp36m-manylinux2014_x86_64.whl diff --git a/src/wheelhouse/pau-0.0.16-102-cp37-cp37m-manylinux2014_x86_64.whl b/wheelhouse/pau-0.0.16-102-cp37-cp37m-manylinux2014_x86_64.whl similarity index 100% rename from src/wheelhouse/pau-0.0.16-102-cp37-cp37m-manylinux2014_x86_64.whl rename to wheelhouse/pau-0.0.16-102-cp37-cp37m-manylinux2014_x86_64.whl diff --git a/src/wheelhouse/pau-0.0.16-102-cp38-cp38-manylinux2014_x86_64.whl b/wheelhouse/pau-0.0.16-102-cp38-cp38-manylinux2014_x86_64.whl similarity index 100% rename from src/wheelhouse/pau-0.0.16-102-cp38-cp38-manylinux2014_x86_64.whl rename to wheelhouse/pau-0.0.16-102-cp38-cp38-manylinux2014_x86_64.whl