optimize the setup.py and setup.sh

pull/1063/head
huangyuxin 3 years ago
parent 1d7ce0eba8
commit 989aec4413

@ -10,16 +10,25 @@ To avoid the trouble of environment setup, [running in Docker container](#runnin
For user who working on `Ubuntu` with `root` privilege.
```python
```bash
git clone https://github.com/PaddlePaddle/DeepSpeech.git
cd DeepSpeech
pip install -e .
cd PaddleSpeech
```
If you want to use the basic function of the repo, you can use:
```bash
pip install .
```
If you want to do the development, you can use:
```
pip install -e .[develop]
```
For user who only needs the basic function of paddlespeech, using conda to do installing is recommended.
You can go to [minicoda](https://docs.conda.io/en/latest/miniconda.html) to select a version and install it by yourself, or you can use the scripts below to install the last miniconda version.
```python
```bash
pushd tools
bash extras/install_miniconda.sh
popd
@ -27,7 +36,7 @@ bash
```
After installing the conda, run the setup.sh to complete the installing process.
```python
```bash
bash setup.sh
```

@ -1,23 +1,19 @@
ConfigArgParse
coverage
distro
editdistance
g2p_en
g2pM
gpustat
GPUtil
h5py
inflect
jieba
jsonlines
kaldiio
librosa
llvmlite
loguru
matplotlib
nara_wpe
nltk
numba
paddlespeech_ctcdecoders
paddlespeech_feat
pandas
@ -25,9 +21,7 @@ phkit
Pillow
praatio~=4.1
pre-commit
psutil
pybind11
pynvml
pypi-kenlm
pypinyin
python-dateutil

@ -7,3 +7,6 @@ description-file = README.md
[magformat]
formatters=yapf
[easy_install]
index-url=https://pypi.tuna.tsinghua.edu.cn/simple

@ -27,6 +27,58 @@ from setuptools.command.install import install
HERE = Path(os.path.abspath(os.path.dirname(__file__)))
requirements = {
"install": [
"editdistance",
"g2p_en",
"g2pM",
"h5py",
"inflect",
"jieba",
"jsonlines",
"kaldiio",
"librosa",
"loguru",
"matplotlib",
"nara_wpe",
"nltk",
"pandas",
"paddlespeech_ctcdecoders",
"paddlespeech_feat",
"praatio~=4.1",
"pypi-kenlm",
"pypinyin",
"python-dateutil",
"pyworld",
"resampy==0.2.2",
"sacrebleu",
"scipy",
"sentencepiece~=0.1.96",
"soundfile~=0.10",
"sox",
"soxbindings",
"textgrid",
"timer",
"tqdm",
"typeguard",
"visualdl",
"webrtcvad",
"yacs",
],
"develop": [
"ConfigArgParse",
"coverage",
"gpustat",
"phkit",
"Pillow",
"pybind11",
"snakeviz",
"unidecode",
"yq",
"pre-commit",
]
}
@contextlib.contextmanager
def pushd(new_dir):
@ -130,7 +182,7 @@ class UploadCommand(Command):
setup_info = dict(
# Metadata
name='paddlespeech',
version='0.0.1a',
version='0.1.0a',
author='PaddlePaddle Speech and Language Team',
author_email='paddlesl@baidu.com',
url='https://github.com/PaddlePaddle/PaddleSpeech',
@ -158,8 +210,10 @@ setup_info = dict(
"gan",
],
python_requires='>=3.6',
install_requires=[d.strip() for d in read('requirements.txt').split()],
install_requires=requirements["install"],
extras_require={
'develop':
requirements["develop"],
'doc': [
"sphinx", "sphinx-rtd-theme", "numpydoc", "myst_parser",
"recommonmark>=0.5.0", "sphinx-markdown-tables", "sphinx-autobuild"

@ -2,7 +2,7 @@
conda install -c conda-forge sox libsndfile swig bzip2 bottleneck gcc_linux-64=8.4.0 gxx_linux-64=8.4.0 --yes
# Install the python lib
pip install -r requirements.txt
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
# Install the auto_log
pushd tools/extras

@ -10,7 +10,7 @@ WGET ?= wget --no-check-certificate
.PHONY: all clean
all: virtualenv.done apt.done kenlm.done sox.done soxbindings.done mfa.done sclite.done
all: virtualenv.done apt.done kenlm.done sox.done mfa.done sclite.done
virtualenv.done:
test -d venv || virtualenv -p $(PYTHON) venv
@ -45,11 +45,6 @@ sox.done:
cd sox-14.4.2 && ./configure --prefix=/usr/ && make -j4 && make install
touch sox.done
soxbindings.done:
test -d soxbindings || git clone https://github.com/pseeth/soxbindings.git
cd soxbindings && python setup.py install
touch soxbindings.done
mfa.done:
test -d montreal-forced-aligner || $(WGET) https://paddlespeech.bj.bcebos.com/Parakeet/montreal-forced-aligner_linux.tar.gz
tar xvf montreal-forced-aligner_linux.tar.gz

Loading…
Cancel
Save