mirror of
https://github.com/enovikov11/NeuroImgBot.git
synced 2026-03-04 03:51:36 +00:00
No description
- JavaScript 66.6%
- Python 33.4%
|
|
||
|---|---|---|
| bot | ||
| systemd-examples | ||
| worker | ||
| .gitignore | ||
| enable-nsfw.js | ||
| environment.yaml | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
Prerequisites
- Telegram bot and group
- Yandex Cloud VMs: light manager VM with static ip, GPU worker VM
- t.me/enovikov11 help
Telegram setup
- Create telegram bot via @BotFather and get API key
- Create group
- Add bot to group
- Make bot admin
- Add @myidbot
- Get group id /getgroupid@myidbot
- Kick @myidbot
Manger setup
sudo apt install git tmuxcurl -sSL https://storage.yandexcloud.net/yandexcloud-yc/install.sh | bashcurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bashnvm install --ltsnvm use --lts
Manager start
cd NeuroImgBotnpm run bot
Worker setup
sudo apt install -y tmux git libice6 libsm6 libxt6 libxrender1 libfontconfig1 libcups2 ncdu sshfsgit clone https://github.com/enovikov11/NeuroImgBot.gitcd NeuroImgBotwget https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.shcurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bashbash Anaconda3-2021.11-Linux-x86_64.shrm Anaconda3-2021.11-Linux-x86_64.shconda env create -f environment.yamlnvm install --ltsnvm use --ltsnpm installnpm run enable-nsfwgit config --global credential.helper storehuggingface-cli loginsudo cp /home/enovikov11/NeuroImgBot/systemd-examples/neuroimg-worker.service /etc/systemd/systemsudo systemctl enable neuroimg-worker.servicesudo systemctl start neuroimg-worker.service
Worker logs
sudo systemctl stop neuroimg-worker.servicesudo journalctl -u neuroimg-worker.service -fsystemd-analyze critical-chain neuroimg-worker.servicesudo systemctl status neuroimg-worker.service