English
Content on This Page

openMind Hub Client Installation

Before the installation, you need to configure the local environment. The openMind Hub Client supports Python 3.8, 3.9, and 3.10. For details, see Installation Description. Compatibility with other versions is not guaranteed.

Installation Guide

To avoid compatibility issues between dependencies in different projects, Python and conda virtual environments are recommended. For details about how to install and manage the virtual environments, see Python virtual environment and conda virtual environment. This document only describes how to create and enable the virtual environments.

  1. Create and activate virtual environments.

    • Create and activate a Python virtual environment.

      shell
      # Create a Python virtual environment named **your_venv_name**.
      python3 -m venv /path/to/your_venv_name
      # Activate the **your_venv_name** virtual environment.
      source /path/to/your_venv_name/bin/activate
      
    • Create and activate a conda virtual environment.

      shell
      # Create a Python 3.8 virtual environment named **your_venv_name**.
      conda create -n your_venv_name python=3.8
      # Activate the **your_venv_name** virtual environment.
      conda activate your_venv_name
      
  2. Install the openMind Hub Client in pip mode as required.

    • Use the default installation mode, which can interact with the Modelers community.

      shell
      pip install openmind_hub
      
    • Install modules of all interconnected third-party communities for interactions. For details, see Interconnection with Third-Party Communities.

      shell
      pip install openmind_hub[all]
      
    • Install a specified community module that can interact with Modelers or a specified community.

      shell
      pip install openmind_hub[openi]
      pip install openmind_hub[huggingface_hub]
      

Verifying the Installation

After the installation is complete, run the following command to check whether openMind Hub Client is successfully installed:

bash
python -c "from openmind_hub import repo_info; print(repo_info('PyTorch-NPU/t5_small'))"

The detailed information about the t5_small model will be displayed in the command output.

Uninstallation

Uninstall openMind Hub Client:

shell
pip uninstall openmind_hub

Note

You can run the following commands to record logs about the installation and uninstallation of openMind Hub Client. LOG_FILE indicates the log path or log file name specified by the user.

Note that installation or uninstallation logs are not dumped. Pay attention to the remaining drive space before recording the logs.

shell
# Record logs during openMind Hub Client installation.
pip install openmind_hub --log LOG_FILE
shell
# Record logs during openMind Hub Client uninstallation.
pip uninstall openmind_hub --log LOG_FILE