beimingwu/docs/content/en/overview/installation.md

34 lines
1.8 KiB
Markdown
Raw Permalink Normal View History

# Environment Installation
2023-11-15 11:49:14 +08:00
2023-11-24 00:32:23 +08:00
In order to enable users to interact with the Beimingwu system easily and efficiently, we provide a series of simple and user-friendly interfaces in the `learnware` Python package. With just a few lines of code, everyone can implement functions such as "learnware specification generation", "learnware search", and "learnware deployment".
2023-11-15 11:49:14 +08:00
2023-11-21 22:12:49 +08:00
## Install via pip
2023-11-16 19:25:29 +08:00
The `learnware` package is currently avabilable on the [PyPI](https://pypi.org/project/learnware/), and its specific installation method is as follows:
2023-11-15 11:49:14 +08:00
```bash
pip install learnware
```
2023-11-21 22:12:49 +08:00
Additionally, to ensure the latest `learnware` package, you can also specify the version and mirror source during installation:
```bash
pip install learnware==0.3.2 -i https://pypi.tuna.tsinghua.edu.cn/simple
2023-11-21 22:12:49 +08:00
```
## Install from Source Code
2024-02-29 16:02:20 +08:00
The source code for the `learnware` package is concurrently released on both [GitLink](https://www.gitlink.org.cn/beimingwu/learnware) and [Github](https://github.com/Learnware-LAMDA/Learnware) platforms. Taking GitHub as an example, users can install it through the source code in the following manner:
2023-11-15 11:49:14 +08:00
```bash
2024-02-29 16:02:20 +08:00
git clone https://github.com/Learnware-LAMDA/Learnware.git
2023-11-15 11:49:14 +08:00
cd Learnware
git fetch origin main
git checkout main
pip install -e .
2023-11-24 00:32:23 +08:00
```
## Important Notes
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:
```bash
pip install learnware[full]
```
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.