Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help trying to get this working in docker #35

Closed
hugalafutro opened this issue Nov 27, 2020 · 7 comments
Closed

help trying to get this working in docker #35

hugalafutro opened this issue Nov 27, 2020 · 7 comments

Comments

@hugalafutro
Copy link

Hi, I use linuxserver/deluge in docker and am trying to enable this plugin.

I followed the same procedure as when installing WebAPI plugin which works, i.e. I copied the egg to the plugins subdir, enabled it in webui and it worked. The WebAPI egg was 3.6 too which is why I had hoped this would work too.

Trying to the same with DefaultTrackers makes it seem everything works, I can click it, but when I close the configuration dialog and reopen it it's disabled.

In logs I can only see these:

pia_deluge  | 14:57:03 [DEBUG   ][deluge.pluginmanagerbase   :116 ] Found plugin: DefaultTrackers 0.2 at /config/plugins/DefaultTrackers-0.2-py3.6.egg
pia_deluge  | 14:58:07 [DEBUG   ][deluge.ui.web.json_api     :202 ] json-request: b'{"method":"web.get_plugin_info","params":["DefaultTrackers"],"id":48}'
pia_deluge  | 14:58:07 [DEBUG   ][deluge.ui.web.json_api     :202 ] json-request: b'{"method":"core.enable_plugin","params":["DefaultTrackers"],"id":49}'

Any help appreciated, thanks!

@stefantalpalaru
Copy link
Owner

Check your Python3 version with python3 --version.

Also, what Deluge interface are you using?

@hugalafutro
Copy link
Author

it's this image https://github.com/linuxserver/docker-deluge and I connect to it using webui

inside the container:

root@805ec1739f00:/# python3 --version
Python 3.6.9

@stefantalpalaru
Copy link
Owner

This plugin doesn't have WebUI support.

@36web
Copy link

36web commented Dec 11, 2020

it's this image https://github.com/linuxserver/docker-deluge and I connect to it using webui

inside the container:

root@805ec1739f00:/# python3 --version
Python 3.6.9

It seems like the "six" python package version in the image (1.11.0) doesn't fit the requirement of this plugin (six>=1.12), the following steps are how I manage it to work, hope this helps.

Since there's no pip installed in this image, so we need to manually install the package.

  1. Run a shell in the docker container.
    docker exec -w /tmp -it <container name or id> bash

  2. Download the latest six package from PyPI.
    curl -sSLO https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz

  3. Extract the tar file.
    tar --no-same-owner --no-same-permissions -xf six-1.15.0.tar.gz

  4. Install the package.
    cp -r six-1.15.0/six.egg-info/ /usr/lib/python3/dist-packages/six-1.15.0.egg-info/ && cp six-1.15.0/six.py /usr/lib/python3/dist-packages/

  5. Remove the old one.
    rm -rf /usr/lib/python3/dist-packages/six-1.11.0.egg-info/

  6. Exit shell and restart container.

@hugalafutro
Copy link
Author

Thanks @36web presumably I'll have to do this every time the image updates, but it is a solution.

@arabcoders
Copy link

you can make a Dockerfile build like this so you dont have to run this every time

FROM ghcr.io/linuxserver/deluge

RUN curl -sSLO https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz
RUN tar --no-same-owner --no-same-permissions -xf six-1.15.0.tar.gz
RUN cp -r six-1.15.0/six.egg-info/ /usr/lib/python3/dist-packages/six-1.15.0.egg-info/ && cp six-1.15.0/six.py /usr/lib/python3/dist-packages/
RUN rm -rf /usr/lib/python3/dist-packages/six-1.11.0.egg-info/

and you can have a docker-compose.yaml like this

version: "3.8"

services:
  deluge:
    build: .
    network_mode: host
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=UTC
      - DELUGE_LOGLEVEL=info
    volumes:
      - /var/config/deluge:/config
      - /downloads/torrents:/downloading
      - /downloads/completed:/completed

@hugalafutro
Copy link
Author

@arabcoders many thanks for that! That's gonna make life a lot easier while keeping everything as is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants