Created
August 15, 2019 05:17
-
-
Save jacobkahn/153a6b7d4f7b892cb568e3e7bc7a4135 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Remove libiomp to avoid double linkage | |
mkdir ~/misc && sudo mv /usr/local/lib/libiomp5.so ~/misc | |
mkdir -p /data/usr | |
### Install libsndfile ### | |
# Dependencies for libsndfile. The entries in Amazon Linux's RHEL | |
# package repo are too old, so some of these need to be built from source. | |
# This is likely not an issue on Ubuntu, and packages from apt-get can be used. | |
# Build and install flac | |
wget https://downloads.xiph.org/releases/flac/flac-1.3.2.tar.xz | |
tar -xf flac-1.3.2.tar.xz | |
./configure | |
make -j96 | |
make install -j96 | |
# Install OGG and Vorbis | |
sudo yum install libogg.x86_64 \ | |
libogg-devel.x86_64 \ | |
libvorbis.x86_64 \ | |
libvorbis-devel.x86_64 \ | |
flac.x86_64 \ | |
lac-devel.x86_64 \ | |
libtool.x86_64 | |
# Install libsndfile (AWS Linux has old versions of automake/aclocal | |
sudo yum install autoconf autogen automake14 | |
sudo ln -s /usr/local/automake14 /usr/local/automake | |
sudo ln -s /usr/local/aclocal-1.4 /usr/local/aclocal | |
# libsndfile | |
wget http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.28.tar.gz | |
tar -xzf libsndfile-1.0.28.tar.gz | |
./configure --prefix=/data/usr | |
make -j96 | |
sudo make install | |
# Install FFTW | |
sudo yum install fftw2.x86_64 fftw-devel.x86_64 | |
# Install Intel MKL | |
sudo yum-config-manager --add-repo https://yum.repos.intel.com/setup/intelproducts.repo | |
sudo yum-config-manager --add-repo https://yum.repos.intel.com/mkl/setup/intel-mkl.repo | |
sudo rpm --import https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB | |
sudo yum install intel-mkl-64bit | |
# Install KenLM | |
wget -O - https://kheafield.com/code/kenlm.tar.gz |tar xz | |
mkdir kenlm/build | |
cd kenlm/build | |
cmake .. -DKENLM_MAX_ORDER=10 -DCMAKE_INSTALL_PREFIX=/data/usr | |
make -j48 | |
### Install ArrayFire ### | |
# needs OpenGL for graphics dependency | |
sudo yum install xorg-x11-server-devel \ | |
xorg-x11-server-utils libXrandr-devel \ | |
libXi-devel libXinerama-devel libXcursor-devel | |
# Install GLFW | |
wget https://github.com/glfw/glfw/archive/3.1.2.zip -O glfw-3.1.2.zip | |
unzip glfw-3.1.2.zip | |
cd glfw-3.1.2 | |
mkdir build | |
cd build | |
cmake .. -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_EXAMPLES=OFF | |
make -j96 | |
make install -j96 | |
# Install ArrayFire | |
git clone --recrusive https://github.com/arrayfire/arrayfire.git | |
git checkout v3.6.4 | |
mkdir build && cd build | |
cmake .. -DAF_BUILD_CPU=OFF \ | |
-DAF_BUILD_OPENCL=OFF \ | |
-DAF_BUILD_EXAMPLES=OFF \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX=/data/usr | |
make install -j96 | |
### Build and install flashlight ### | |
git clone https://github.com/facebookresearch/flashlight.git | |
cd flashlight && mkdir build && cd build | |
cmake .. -DFLASHLIGHT_BACKEND=CUDA \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX=/data/usr \ | |
-DNCCL_INCLUDE_DIR=/usr/local/cuda/include \ | |
-DNCCL_LIB_DIR=/usr/local/cuda/lib | |
make install -j96 | |
### Build and install wav2letter ### | |
git clone --recursive https://github.com/facebookresearch/wav2letter.git | |
cd wav2letter | |
export MKLROOT=/opt/intel/mkl | |
mkdir build && cd build | |
cmake .. -DCMAKE_PREFIX_PATH=/data/usr \ | |
-DKENLM_LIB=/data/kenlm/kenlm/build/lib/libkenlm.a \ | |
-DKENLM_DIR=/data/kenlm/kenlm/ \ | |
-DKENLM_UTIL_LIB=/data/kenlm/kenlm/build/lib/libkenlm_util.a \ | |
-DW2L_LIBRARIES_USE_CUDA=ON \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-Dflashlight_DIR=/data/usr/share/flashlight/cmake |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment