sabnzbd / sabnzbd

SABnzbd - The automated Usenet download tool
http://sabnzbd.org
Other
2.24k stars 338 forks source link

Google Colab support?! #1616

Closed hdr110 closed 3 years ago

hdr110 commented 3 years ago

Hi. I've been trying to run this code on google colaboratory but since I can not choose whether I want to upload .nzb files or URL, the code pauses here waiting for a command:

2020-09-22 02:38:17,414::INFO::[SABnzbd:1143] SABnzbd.py-3.2.0-develop (rev=unknown)
2020-09-22 02:38:17,414::INFO::[SABnzbd:1144] Full executable path = /content/drive/Shared drives/ramineda/nzb/sabnzbd-develop/SABnzbd.py
2020-09-22 02:38:17,415::INFO::[SABnzbd:1154] Platform = posix
2020-09-22 02:38:17,415::INFO::[SABnzbd:1155] Python-version = 3.6.9 (default, Jul 17 2020, 12:50:27) 
[GCC 8.4.0]
2020-09-22 02:38:17,415::INFO::[SABnzbd:1156] Arguments = "/content/drive/Shared drives/ramineda/nzb/sabnzbd-develop/SABnzbd.py"
2020-09-22 02:38:17,415::INFO::[SABnzbd:1158] Running inside a docker container
2020-09-22 02:38:17,415::INFO::[SABnzbd:1163] Preferred encoding = UTF-8
2020-09-22 02:38:17,415::INFO::[SABnzbd:1175] SSL version = OpenSSL 1.1.1  11 Sep 2018
2020-09-22 02:38:17,417::INFO::[SABnzbd:1184] Certifi version: 2020.06.20
2020-09-22 02:38:17,417::INFO::[SABnzbd:1185] Loaded additional certificates from: /usr/local/lib/python3.6/dist-packages/certifi/cacert.pem
2020-09-22 02:38:17,417::INFO::[SABnzbd:1230] Using INI file /root/.sabnzbd/sabnzbd.ini
2020-09-22 02:38:17,420::INFO::[postproc:140] Loading postproc queue
2020-09-22 02:38:17,420::INFO::[__init__:951] [N/A] /root/.sabnzbd/admin/Rating.sab missing
2020-09-22 02:38:17,421::INFO::[scheduler:216] Setting schedule for midnight BPS reset
2020-09-22 02:38:17,422::INFO::[config:857] Writing settings to INI file /root/.sabnzbd/sabnzbd.ini
2020-09-22 02:38:17,424::INFO::[__init__:349] All processes started
2020-09-22 02:38:17,425::INFO::[SABnzbd:297] Template location for Glitter is /content/drive/Shared drives/ramineda/nzb/sabnzbd-develop/interfaces/Glitter
2020-09-22 02:38:17,426::INFO::[SABnzbd:297] Template location for Config is /content/drive/Shared drives/ramineda/nzb/sabnzbd-develop/interfaces/Config
2020-09-22 02:38:17,427::INFO::[misc:986] [N/A] Running external command: ['/usr/bin/unrar']
2020-09-22 02:38:17,434::INFO::[misc:986] [N/A] Running external command: ['/usr/bin/par2', '-h']
2020-09-22 02:38:17,442::INFO::[SABnzbd:398] SABYenc module (v4.0.2)... found!
2020-09-22 02:38:17,442::INFO::[SABnzbd:417] Cryptography module (v3.1)... found!
2020-09-22 02:38:17,442::INFO::[SABnzbd:422] par2 binary... found (/usr/bin/par2)
2020-09-22 02:38:17,442::INFO::[SABnzbd:429] UNRAR binary... found (/usr/bin/unrar)
2020-09-22 02:38:17,442::INFO::[SABnzbd:439] UNRAR binary version 5.50
2020-09-22 02:38:17,443::INFO::[SABnzbd:447] 7za binary... found (/usr/bin/7za)
2020-09-22 02:38:17,443::INFO::[SABnzbd:458] nice binary... found (/usr/bin/nice)
2020-09-22 02:38:17,443::INFO::[SABnzbd:462] ionice binary... found (/usr/bin/ionice)
2020-09-22 02:38:17,445::INFO::[SABnzbd:1417] Starting web-interface on 127.0.0.1:8085
2020-09-22 02:38:17,445::INFO::[_cplogging:216] [22/Sep/2020:02:38:17] ENGINE Bus STARTING
2020-09-22 02:38:17,553::INFO::[_cplogging:216] [22/Sep/2020:02:38:17] ENGINE Serving on http://127.0.0.1:8085
2020-09-22 02:38:17,553::INFO::[_cplogging:216] [22/Sep/2020:02:38:17] ENGINE Bus STARTED
2020-09-22 02:38:17,554::INFO::[SABnzbd:1454] Starting SABnzbd.py-3.2.0-develop
2020-09-22 02:38:17,555::INFO::[postproc:230] Completed Download Folder /root/Downloads/complete is not on FAT
2020-09-22 02:38:17,558::INFO::[dirscanner:117] Dirscanner starting up
2020-09-22 02:38:17,558::INFO::[urlgrabber:96] URLGrabber starting up
2020-09-22 02:38:17,559::INFO::[panic:239] Launching browser with http://127.0.0.1:8085/sabnzbd
2020-09-22 02:38:17,560::INFO::[notifier:122] Sending notification: SABnzbd - SABnzbd 3.2.0-develop started (type=startup, job_cat=None)
2020-09-22 02:38:17,681::INFO::[zconfig:71] No Bonjour/ZeroConfig support installed

Is there any way I can use this on colab?

jeffgeorge commented 3 years ago

I'm honestly amazed you got it to run at all. Colab is absolutely not intended for this kind of workload, and I wouldn't be surprised if Google would consider it abuse. As I understand it, Colab is intended for gpu-intensive script runs, not persistent daemons like sabnzbd. You're likely going to have your server killed as soon as it goes idle.

Safihre commented 3 years ago

Is there some way you can reach this instance? Indeed we only support adding files through API-calls. You'll probably for starters have to run it with extra parameter -s 0.0.0.0:8080