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

Docker image crashes since 2.0.7 #164

Closed
Shraymonks opened this issue May 31, 2024 · 5 comments · Fixed by #168
Closed

Docker image crashes since 2.0.7 #164

Shraymonks opened this issue May 31, 2024 · 5 comments · Fixed by #168
Labels
bug Something isn't working

Comments

@Shraymonks
Copy link
Contributor

Describe the bug
Docker image appears to be broken since 2.0.7. It immediately crashes upon running.

To Reproduce
Steps to reproduce the behavior:

  1. Start docker container with 2.0.7 or 2.0.8 image.

Expected behavior
Supposed to run normally.

iSponsorBlockTV server (please complete the following information):

  • OS: Docker on linux amd64

Additional context

It immediately crashes with this:

Traceback (most recent call last):

  File "./main.py", line 1, in <module>

  File "./iSponsorBlockTV/helpers.py", line 8, in <module>

ModuleNotFoundError: No module named 'appdirs'

Is there an issue with the docker build that's changed since 2.0.6? Are the dependencies being installed differently?

@Shraymonks Shraymonks added the bug Something isn't working label May 31, 2024
@dmunozv04
Copy link
Owner

Dependencies are being installed the same way, only change was a bump in versions.
I've just tested running the latest linux/amd64 image and it runs fine for me; and the appdirs module is present on it.
Please try running docker exec iSponsorBlockTV ls /root/.local/lib/python3.11/site-packages/ with iSponsorBlockTV being the name of your docker container and please post its output.

@rifelpet
Copy link

rifelpet commented Jun 1, 2024

This issue is specific to running the container with a non-root user:

❯ docker run --user 1002:1002 -v $(pwd):/app/data -it --rm ghcr.io/dmunozv04/isponsorblocktv:v2.0.8
Traceback (most recent call last):
  File "./main.py", line 1, in <module>
  File "./iSponsorBlockTV/helpers.py", line 8, in <module>
ModuleNotFoundError: No module named 'appdirs'
❯ docker run -v $(pwd):/app/data -it --rm ghcr.io/dmunozv04/isponsorblocktv:v2.0.8
2024-06-01 14:33:35,369 - iSponsorBlockTV - INFO - Starting device

which worked in 2.0.6:

❯ docker run --user 1002:1002 -v $(pwd):/app/data -it --rm ghcr.io/dmunozv04/isponsorblocktv:v2.0.6
[06/01/24 14:34:34] INFO     YouTube on TV Starting device                                                                                                                     

likely as a result of 80196b1

exec'ing in as the non-root user reveals the lack of permissions:

❯ docker exec iSponsorBlockTV ls /root/.local/lib/python3.11/site-packages/

ls: /root/.local/lib/python3.11/site-packages/: Permission denied

but exec'ing in as the root user displays the packages as expected:

❯ docker exec --user root iSponsorBlockTV ls /root/.local/lib/python3.11/site-packages/

aiohttp
aiohttp-3.9.5.dist-info
aiosignal
aiosignal-1.3.1.dist-info
appdirs-1.4.4.dist-info
appdirs.pyc
...

@dmunozv04
Copy link
Owner

Oh, that makes sense

@Shraymonks
Copy link
Contributor Author

Is there a reason for moving the deps from /usr/local/ to /root/.local/ in 80196b1? That's why there's the permission issue.

@dmunozv04
Copy link
Owner

Iirc it was done to be able to reduce the image size a bit, but reverting it should be just fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants