-
Notifications
You must be signed in to change notification settings - Fork 44
Installation Instructions
This Wiki aims to provide the installation instructions for Muskit
$ cd <any-place>
$ git clone https://github.com/SJTMusicTeam/Muskits.git
If you have complied Kaldi at Step1, put it under tools
.
$ cd <Muskits-root>/tools
$ ln -s <kaldi-root> .
If you do not have Muskits/tools/kaldi
, when make
, Kaldi repository is automatcally put without compliling (For now, we only use some basic shell in Kaldi, so no need for complied versions).
You have to create <Muskits-root>/tools/activate_python.sh
to specify the Python interpreter used in Muskits recipes. (To understand how Muskits specifies Python, see path.sh
for example.)
We also have some scripts to generate tools/activate_python.sh
.
- Option A: setup anaconda environment
$ cd <Muskits-root>/tools
$ ./setup_anaconda.sh [output-dir-name|default=venv] [conda-env-name|default=root] [python-version|default=none]
# e.g.
$ ./setup_anaconda.sh anaconda muskit 3.8
This script tries to create a new miniconda if the output directory doesn’t exist. If you already have Anaconda and you’ll use it then,
$ cd <Muskits-root>/tools
$ CONDA_TOOLS_DIR=$(dirname ${CONDA_EXE})/..
$ ./setup_anaconda.sh ${CONDA_TOOLS_DIR} [conda-env-name] [python-version]
# e.g.
$ ./setup_anaconda.sh ${CONDA_TOOLS_DIR} muskit 3.8
- Option B: Setup system Python environment
$ cd <Muskits-root>/tools
$ ./setup_python.sh $(command -v python3)
- Option C: Without setting Python environment
Option B
and Option C
are almost the same. This option might be suitable for Google Colab.
$ cd <Muskits-root>/tools
$ rm -f activate_python.sh && touch activate_python.sh
$ cd <Muskits-root>/tools
$ make
The Makefile tries to install Muskits and all dependencies including PyTorch. You can also specify a PyTorch version, for example:
$ cd <Muskits-root>/tools
$ make TH_VERSION=1.8.1
Note that the CUDA version is derived from nvcc
command. If you’d like to specify the other CUDA version, you need to give CUDA_VERSION
.
$ cd <Muskits-root>/tools
$ make TH_VERSION=1.8.1 CUDA_VERSION=10.2
If you don’t have nvcc
command, packages are installed for CPU mode by default. If you’ll turn it on manually, give CPU_ONLY
option.
$ cd <Muskits-root>/tools
$ make CPU_ONLY=0
You can check whether your installation is successfully finished by
$ cd <Muskits-root>/tools
$ . ./activate_python.sh; python3 check_install.py
Note that this check is always called in the last stage of the above installation.