File tree Expand file tree Collapse file tree 3 files changed +19
-11
lines changed
build_tools/packaging/wheel Expand file tree Collapse file tree 3 files changed +19
-11
lines changed Original file line number Diff line number Diff line change 2828
2929# build mad, statically
3030pushd libmad-0.15.1b
31+ # See https://stackoverflow.com/a/12864879/23845
32+ sed -i.bak ' s/-march=i486//' configure
3133./configure --disable-shared --enable-static --prefix=" $PREFIX /audio/third_party/mad" CFLAGS=-fPIC CXXFLAGS=-fPIC \
3234 --with-pic --disable-debug --disable-dependency-tracking
3335make -s -j && make install
3436popd
3537
3638# build sox, statically
39+ # --without-png makes OS X build less hazardous; somehow the build
40+ # finds png and enables it. We don't want it; we'd need to package
41+ # it statically if we do.
3742pushd sox-14.4.2
3843./configure --disable-shared --enable-static --prefix=" $PREFIX /audio/third_party/sox" \
3944 LDFLAGS=" -L$PREFIX /audio/third_party/lame/lib -L$PREFIX /audio/third_party/flac/lib -L$PREFIX /audio/third_party/mad/lib" \
4045 CPPFLAGS=" -I$PREFIX /audio/third_party/lame/include -I$PREFIX /audio/third_party/flac/include -I$PREFIX /audio/third_party/mad/include" \
41- --with-lame --with-flac --with-mad --without-oggvorbis --without-oss --without-sndfile CFLAGS=-fPIC CXXFLAGS=-fPIC --with-pic --disable-debug --disable-dependency-tracking
46+ --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
4247make -s -j && make install
4348popd
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ if [ "$#" -ne 1 ]; then
55fi
66export CUVER=" $1 " # cu90 cu100 cpu
77
8- export TORCHAUDIO_BUILD_VERSION=" 0.2 .0"
8+ export TORCHAUDIO_BUILD_VERSION=" 0.3 .0"
99export TORCHAUDIO_BUILD_NUMBER=" 1"
1010export OUT_DIR=" /remote/$CUVER "
1111
@@ -27,13 +27,18 @@ export PREFIX="/tmp"
2727cd /tmp/audio
2828
2929for PYDIR in " ${python_installations[@]} " ; do
30- # wheels for numba does not work with python 2.7
31- if [[ " $PYDIR " == " /opt/python/cp27-cp27m/" || " $PYDIR " == " /opt/python/cp27-cp27mu/" ]]; then
32- continue ;
33- fi
3430 export PATH=$PYDIR /bin:$OLD_PATH
3531 pip install --upgrade pip
36- pip install -r requirements.txt
32+
33+ # For true hermetic builds, you ought to be constructing the docker
34+ # from scratch each time. But this makes things marginally safer if
35+ # you aren't doing this.
36+ pip uninstall -y torch || true
37+ pip uninstall -y torch_nightly || true
38+
39+ # NB: do not actually install requirements.txt; that is only needed for
40+ # testing
41+ pip install torch numpy future
3742 IS_WHEEL=1 python setup.py clean
3843 IS_WHEEL=1 python setup.py bdist_wheel
3944 mkdir -p $OUT_DIR
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh &
1111
1212. ~ /minconda_wheel_env_tmp/bin/activate
1313
14- export TORCHAUDIO_BUILD_VERSION=" 0.2 .0"
14+ export TORCHAUDIO_BUILD_VERSION=" 0.3 .0"
1515export TORCHAUDIO_BUILD_NUMBER=" 1"
1616export OUT_DIR=~ /torchaudio_wheels
1717
4040 conda create -yn $env_name python=" $desired_python "
4141 conda activate $env_name
4242
43- # install torchaudio dependencies
44- pip install -r requirements.txt
45-
43+ pip install torch numpy future
4644 IS_WHEEL=1 python setup.py clean
4745 IS_WHEEL=1 python setup.py bdist_wheel
4846 mkdir -p $OUT_DIR
You can’t perform that action at this time.
0 commit comments