1
0
forked from bot/app
LiteyukiBot/docs/en/deploy/install.md

57 lines
2.3 KiB
Markdown
Raw Normal View History

2024-08-17 02:24:25 +08:00
---
title: Install
2024-08-17 02:24:25 +08:00
order: 1
---
# Install
2024-08-17 02:24:25 +08:00
## **Normal Installation**
2024-08-17 02:24:25 +08:00
1. Install [`Git`](https://git-scm.com/download/) and [`Python3.10+`](https://www.python.org/downloads/release/python-31010/) Environment.
2024-08-17 02:24:25 +08:00
```bash
# Clone the project
2024-08-17 02:24:25 +08:00
git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1
# change directory
2024-08-17 02:24:25 +08:00
cd LiteyukiBot
# install dependencies
2024-08-17 02:24:25 +08:00
pip install -r requirements.txt
# start the bot!
2024-08-17 02:24:25 +08:00
python main.py
```
> [!tip]
> It is recommended to use a virtual environment to run Liteyuki to avoid dependency conflicts.
> You can use `python -m venv .venv` to create a virtual environment, and then use `.venv\Scripts\activate` to activate the virtual environment
> (use `source .venv/bin/activate` to activate on Linux).
2024-08-17 02:24:25 +08:00
## **Run with Docker**
2024-08-17 02:24:25 +08:00
1. Install [`Docker`](https://docs.docker.com/get-docker/)
2. Clone Repo `git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1`
3. Change directory `cd LiteyukiBot`
4. Build docker image `docker build -t liteyukibot .`
5. Run container `docker run -p 20216:20216 -v $(pwd):/liteyukibot -v $(pwd)/.cache:/root/.cache liteyukibot`
2024-08-17 02:24:25 +08:00
> [!tip]
> If you are using Windows, please use the absolute project directory `/path/to/LiteyukiBot` instead of `$&#40;pwd&#41;` <br>
> If you have modified the port number, please replace `20216:20216` with your port number
2024-08-17 02:24:25 +08:00
## **Use TRSS Script**
[TRSS_Liteyuki Management Script](https://timerainstarsky.github.io/TRSS_Liteyuki/), which provides a more convenient way to manage LiteyukiBot, recommended to use `Arch Linux`
2024-08-17 02:24:25 +08:00
## **Device Requirements**
- Windows system version minimum `Windows10+`/`Windows Server 2019+`
- Linux system requires Python3.10+, recommended `Ubuntu 20.04+`
- CPU: at least `1vCPU`
- Memory: Bot without other plugins will occupy `300~500MB`, including `chromium` and `node` processes, other plugins depend on specific plugins, recommended `1GB` or more
- Disk: at least `1GB` of space
2024-08-17 02:24:25 +08:00
> [!warning]
> If there are multiple environments on the device, please use `path/to/python -m pip install -r requirements.txt` to install dependencies, `path/to/python` is the path to your Python executable
2024-08-17 02:24:25 +08:00
> [!warning]
> Liteyuki's update function depends on Git. If you do not have Git installed and run the source code directly, you will not be able to use the update function
2024-08-17 02:24:25 +08:00
#### For other questions, please refer to [FAQ](./fandq)