“5e8ba7d7c043570e313eb02a37f0845f81d022b8”上不存在“doc/design/program.html”
提交 989aec44 编写于 作者: H huangyuxin

optimize the setup.py and setup.sh

上级 1d7ce0eb
...@@ -10,16 +10,25 @@ To avoid the trouble of environment setup, [running in Docker container](#runnin ...@@ -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. For user who working on `Ubuntu` with `root` privilege.
```python ```bash
git clone https://github.com/PaddlePaddle/DeepSpeech.git git clone https://github.com/PaddlePaddle/DeepSpeech.git
cd DeepSpeech cd PaddleSpeech
pip install -e . ```
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. 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. 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 pushd tools
bash extras/install_miniconda.sh bash extras/install_miniconda.sh
popd popd
...@@ -27,7 +36,7 @@ bash ...@@ -27,7 +36,7 @@ bash
``` ```
After installing the conda, run the setup.sh to complete the installing process. After installing the conda, run the setup.sh to complete the installing process.
```python ```bash
bash setup.sh bash setup.sh
``` ```
......
...@@ -7,3 +7,6 @@ description-file = README.md ...@@ -7,3 +7,6 @@ description-file = README.md
[magformat] [magformat]
formatters=yapf formatters=yapf
[easy_install]
index-url=https://pypi.tuna.tsinghua.edu.cn/simple
...@@ -27,6 +27,58 @@ from setuptools.command.install import install ...@@ -27,6 +27,58 @@ from setuptools.command.install import install
HERE = Path(os.path.abspath(os.path.dirname(__file__))) 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 @contextlib.contextmanager
def pushd(new_dir): def pushd(new_dir):
...@@ -130,7 +182,7 @@ class UploadCommand(Command): ...@@ -130,7 +182,7 @@ class UploadCommand(Command):
setup_info = dict( setup_info = dict(
# Metadata # Metadata
name='paddlespeech', name='paddlespeech',
version='0.0.1a', version='0.1.0a',
author='PaddlePaddle Speech and Language Team', author='PaddlePaddle Speech and Language Team',
author_email='paddlesl@baidu.com', author_email='paddlesl@baidu.com',
url='https://github.com/PaddlePaddle/PaddleSpeech', url='https://github.com/PaddlePaddle/PaddleSpeech',
...@@ -158,8 +210,10 @@ setup_info = dict( ...@@ -158,8 +210,10 @@ setup_info = dict(
"gan", "gan",
], ],
python_requires='>=3.6', python_requires='>=3.6',
install_requires=[d.strip() for d in read('requirements.txt').split()], install_requires=requirements["install"],
extras_require={ extras_require={
'develop':
requirements["develop"],
'doc': [ 'doc': [
"sphinx", "sphinx-rtd-theme", "numpydoc", "myst_parser", "sphinx", "sphinx-rtd-theme", "numpydoc", "myst_parser",
"recommonmark>=0.5.0", "sphinx-markdown-tables", "sphinx-autobuild" "recommonmark>=0.5.0", "sphinx-markdown-tables", "sphinx-autobuild"
......
...@@ -2,7 +2,7 @@ ...@@ -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 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 # 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 # Install the auto_log
pushd tools/extras pushd tools/extras
......
...@@ -10,7 +10,7 @@ WGET ?= wget --no-check-certificate ...@@ -10,7 +10,7 @@ WGET ?= wget --no-check-certificate
.PHONY: all clean .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: virtualenv.done:
test -d venv || virtualenv -p $(PYTHON) venv test -d venv || virtualenv -p $(PYTHON) venv
...@@ -45,11 +45,6 @@ sox.done: ...@@ -45,11 +45,6 @@ sox.done:
cd sox-14.4.2 && ./configure --prefix=/usr/ && make -j4 && make install cd sox-14.4.2 && ./configure --prefix=/usr/ && make -j4 && make install
touch sox.done 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: mfa.done:
test -d montreal-forced-aligner || $(WGET) https://paddlespeech.bj.bcebos.com/Parakeet/montreal-forced-aligner_linux.tar.gz 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 tar xvf montreal-forced-aligner_linux.tar.gz
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册