Skip to content

Latest commit

 

History

History
80 lines (62 loc) · 1.95 KB

installation.md

File metadata and controls

80 lines (62 loc) · 1.95 KB

Installation

Additional Requirements

  • Linux
  • GCC 7+
  • Python 3.6+
  • PyTorch 1.9+
  • CUDA 10.2+

Dependency Installation

  1. Create a conda virtual environment and activate

    conda create -n tinynas python=3.6 -y
    conda activate tinynas
  2. Install OpenMPI and mpi4py

    a. Install using conda command(recommended)

    conda install -c conda-forge mpi4py=3.0.3 openmpi=4.0.4

    b. Build from source (More faster when Multi-Process)

    • From Here download openmpi source code
    tar -xzvf openmpi-4.0.1.tar.gz
    cd openmpi-4.0.1
    ./configure --prefix=$HOME/openmpi
    make && make install
    • add mpi to the system path
    export PATH=$HOME/openmpi/bin:$PATH
    export LD_LIBRARY_PATH=$HOME/openmpi/lib:$LD_LIBRARY_PATH
    • install mpi4py
    # conda
    conda install -c conda-forge mpi4py
    # or pip
    pip install mpi4py
  3. Run the following commands or Official Guide install torch and torchvision

    conda install pytorch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0 cudatoolkit=10.2 -c pytorch

    If you see "Not be found for jpeg", please install libjpeg first.

    sudo yum install libjpeg # for centos
    sudo apt install libjpeg-dev # for ubuntu
  4. ModelScope (optional)

    For light-weight, we modify and port some code of modelscope , if you want to experience more features, you can visite ModelScope , or run the following installation commands

    pip install "modelscope[cv]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
  5. Other Requirements

    pip install -r requirements/nas.txt
  6. Installation check

    import tinynas 
    print(tinynas.__version__)