mirror of
https://github.com/csukuangfj/kaldifeat.git
synced 2025-08-10 18:42:17 +00:00
50 lines
1.2 KiB
Bash
Executable File
50 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
set -ex
|
|
|
|
if [ -z $PYTHON_VERSION ]; then
|
|
echo "Please set the environment variable PYTHON_VERSION"
|
|
echo "Example: export PYTHON_VERSION=3.8"
|
|
# Valid values: 3.8, 3.9, 3.10, 3.11
|
|
exit 1
|
|
fi
|
|
|
|
if [ -z $TORCH_VERSION ]; then
|
|
echo "Please set the environment variable TORCH_VERSION"
|
|
echo "Example: export TORCH_VERSION=1.10.0"
|
|
exit 1
|
|
fi
|
|
|
|
export PATH=$PYTHON_INSTALL_DIR/bin:$PATH
|
|
export LD_LIBRARY_PATH=$PYTHON_INSTALL_DIR/lib:$LD_LIBRARY_PATH
|
|
ls -lh $PYTHON_INSTALL_DIR/lib/
|
|
|
|
python3 --version
|
|
which python3
|
|
|
|
python3 -m pip install scikit-build
|
|
python3 -m pip install -U pip cmake
|
|
python3 -m pip install wheel twine typing_extensions
|
|
python3 -m pip install bs4 requests tqdm auditwheel
|
|
|
|
echo "Installing torch"
|
|
python3 -m pip install -qq torch==$TORCH_VERSION -f https://download.pytorch.org/whl/torch_stable.html || \
|
|
python3 -m pip install -qq torch==$TORCH_VERSION -f https://download.pytorch.org/whl/torch/
|
|
|
|
rm -rf ~/.cache/pip
|
|
yum clean all
|
|
|
|
cd /var/www
|
|
|
|
export CMAKE_CUDA_COMPILER_LAUNCHER=
|
|
export KALDIFEAT_CMAKE_ARGS=" -DPYTHON_EXECUTABLE=$PYTHON_INSTALL_DIR/bin/python3 "
|
|
export KALDIFEAT_MAKE_ARGS=" -j "
|
|
|
|
|
|
python3 setup.py bdist_wheel
|
|
|
|
mkdir /var/www/wheelhouse
|
|
cp -v dist/*.whl /var/www/wheelhouse
|
|
|
|
ls -lh /var/www
|