Skip to content
Merged
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
7 changes: 6 additions & 1 deletion build_tools/packaging/wheel/build_from_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,21 @@ popd

# build mad, statically
pushd libmad-0.15.1b
# See https://stackoverflow.com/a/12864879/23845
sed -i.bak 's/-march=i486//' configure
./configure --disable-shared --enable-static --prefix="$PREFIX/audio/third_party/mad" CFLAGS=-fPIC CXXFLAGS=-fPIC \
--with-pic --disable-debug --disable-dependency-tracking
make -s -j && make install
popd

# build sox, statically
# --without-png makes OS X build less hazardous; somehow the build
# finds png and enables it. We don't want it; we'd need to package
# it statically if we do.
pushd sox-14.4.2
./configure --disable-shared --enable-static --prefix="$PREFIX/audio/third_party/sox" \
LDFLAGS="-L$PREFIX/audio/third_party/lame/lib -L$PREFIX/audio/third_party/flac/lib -L$PREFIX/audio/third_party/mad/lib" \
CPPFLAGS="-I$PREFIX/audio/third_party/lame/include -I$PREFIX/audio/third_party/flac/include -I$PREFIX/audio/third_party/mad/include" \
--with-lame --with-flac --with-mad --without-oggvorbis --without-oss --without-sndfile CFLAGS=-fPIC CXXFLAGS=-fPIC --with-pic --disable-debug --disable-dependency-tracking
--with-lame --with-flac --with-mad --without-png --without-oggvorbis --without-oss --without-sndfile CFLAGS=-fPIC CXXFLAGS=-fPIC --with-pic --disable-debug --disable-dependency-tracking
make -s -j && make install
popd
17 changes: 11 additions & 6 deletions build_tools/packaging/wheel/linux_manywheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ "$#" -ne 1 ]; then
fi
export CUVER="$1" # cu90 cu100 cpu

export TORCHAUDIO_BUILD_VERSION="0.2.0"
export TORCHAUDIO_BUILD_VERSION="0.3.0"
export TORCHAUDIO_BUILD_NUMBER="1"
export OUT_DIR="/remote/$CUVER"

Expand All @@ -27,13 +27,18 @@ export PREFIX="/tmp"
cd /tmp/audio

for PYDIR in "${python_installations[@]}"; do
# wheels for numba does not work with python 2.7
if [[ "$PYDIR" == "/opt/python/cp27-cp27m/" || "$PYDIR" == "/opt/python/cp27-cp27mu/" ]]; then
continue;
fi
export PATH=$PYDIR/bin:$OLD_PATH
pip install --upgrade pip
pip install -r requirements.txt

# For true hermetic builds, you ought to be constructing the docker
# from scratch each time. But this makes things marginally safer if
# you aren't doing this.
pip uninstall -y torch || true
pip uninstall -y torch_nightly || true

# NB: do not actually install requirements.txt; that is only needed for
# testing
pip install torch numpy future
IS_WHEEL=1 python setup.py clean
IS_WHEEL=1 python setup.py bdist_wheel
mkdir -p $OUT_DIR
Expand Down
6 changes: 2 additions & 4 deletions build_tools/packaging/wheel/osx_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh &

. ~/minconda_wheel_env_tmp/bin/activate

export TORCHAUDIO_BUILD_VERSION="0.2.0"
export TORCHAUDIO_BUILD_VERSION="0.3.0"
export TORCHAUDIO_BUILD_NUMBER="1"
export OUT_DIR=~/torchaudio_wheels

Expand Down Expand Up @@ -40,9 +40,7 @@ do
conda create -yn $env_name python="$desired_python"
conda activate $env_name

# install torchaudio dependencies
pip install -r requirements.txt

pip install torch numpy future
IS_WHEEL=1 python setup.py clean
IS_WHEEL=1 python setup.py bdist_wheel
mkdir -p $OUT_DIR
Expand Down