You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

install.rst 2.0 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. .. _install:
  2. ========================
  3. Installation Guide
  4. ========================
  5. ``Learnware`` Package Installation
  6. ===================================
  7. .. note::
  8. ``Learnware`` package supports `Windows`, `Linux`. It's recommended to use ``Learnware`` in `Linux`. ``Learnware`` supports Python3, which is up to Python3.11.
  9. Users can easily install ``Learnware`` by pip according to the following command:
  10. .. code-block:: bash
  11. pip install learnware
  12. In the ``Learnware`` package, besides the base classes, many core functionalities such as "learnware specification generation" and "learnware deployment" rely on the ``torch`` library. Users have the option to manually install ``torch``, or they can directly use the following command to install the ``learnware`` package:
  13. .. code-block:: bash
  14. pip install learnware[full]
  15. .. note::
  16. However, it's crucial to note that due to the potential complexity of the user's local environment, installing ``learnware[full]`` does not guarantee that ``torch`` will successfully invoke ``CUDA`` in the user's local setting.
  17. Install ``Learnware`` Package From Source
  18. ==========================================
  19. Also, Users can install ``Learnware`` by the source code according to the following steps:
  20. - Enter the root directory of ``Learnware``, in which the file ``setup.py`` exists.
  21. - Then, please execute the following command to install the environment dependencies and install ``Learnware``:
  22. .. code-block:: bash
  23. $ git clone hhttps://github.com/Learnware-LAMDA/Learnware.git && cd Learnware
  24. $ pip install -e .[dev]
  25. .. note::
  26. It's recommended to use anaconda/miniconda to setup the environment. Also you can run ``pip install -e .[full, dev]`` to install ``torch`` automatically as well.
  27. Use the following code to make sure the installation successful:
  28. .. code-block:: python
  29. >>> import learnware
  30. >>> learnware.__version__
  31. <LATEST VERSION>