No description
  • JavaScript 66.6%
  • Python 33.4%
Find a file
2023-09-30 21:54:57 +02:00
bot command 2022-09-13 23:36:40 +03:00
systemd-examples sshfs 2022-09-13 23:30:37 +03:00
worker worker with resize 2022-09-12 23:35:40 +03:00
.gitignore query logic 2022-09-11 02:24:59 +03:00
enable-nsfw.js pipeline worker example 2022-09-10 18:45:16 +03:00
environment.yaml pipeline worker example 2022-09-10 18:45:16 +03:00
package-lock.json Bump semver from 5.7.1 to 5.7.2 2023-09-30 19:54:29 +00:00
package.json Bump yaml from 2.1.1 to 2.2.2 2023-09-30 19:53:59 +00:00
README.md hotfix 2022-09-11 22:12:13 +03:00

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 tmux
  • curl -sSL https://storage.yandexcloud.net/yandexcloud-yc/install.sh | bash
  • curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
  • nvm install --lts
  • nvm use --lts

Manager start

  • cd NeuroImgBot
  • npm run bot

Worker setup

  • sudo apt install -y tmux git libice6 libsm6 libxt6 libxrender1 libfontconfig1 libcups2 ncdu sshfs
  • git clone https://github.com/enovikov11/NeuroImgBot.git
  • cd NeuroImgBot
  • wget https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh
  • curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
  • bash Anaconda3-2021.11-Linux-x86_64.sh
  • rm Anaconda3-2021.11-Linux-x86_64.sh
  • conda env create -f environment.yaml
  • nvm install --lts
  • nvm use --lts
  • npm install
  • npm run enable-nsfw
  • git config --global credential.helper store
  • huggingface-cli login
  • sudo cp /home/enovikov11/NeuroImgBot/systemd-examples/neuroimg-worker.service /etc/systemd/system
  • sudo systemctl enable neuroimg-worker.service
  • sudo systemctl start neuroimg-worker.service

Worker logs

  • sudo systemctl stop neuroimg-worker.service
  • sudo journalctl -u neuroimg-worker.service -f
  • systemd-analyze critical-chain neuroimg-worker.service
  • sudo systemctl status neuroimg-worker.service