stashapp / stash

An organizer for your porn, written in Go. Documentation: https://docs.stashapp.cc
https://stashapp.cc/
GNU Affero General Public License v3.0
8.48k stars 755 forks source link

[Bug Report] Python Libraries Missing When Running Docker Container As Non-Root User #4677

Open TheStashMaster opened 4 months ago

TheStashMaster commented 4 months ago

Describe the bug When running Stash in a docker container AS A USER OTHER THAN ROOT some python scrapers fail due to missing dependencies. The instructions in Stash logs suggest using pip install XXX to resolve the issue but installing as the alternate user and root does not resolve the issue. I've created my own build file that does work around the issue but perhaps running the python portion in a virtual environment would be a better solution?

To Reproduce Steps to reproduce the behavior:

  1. docker-compose.yml

version: '3.4' services: stash: image: stashapp/stash:latest user: "1000"

  1. scraper a scene from https://www.teamskeet.com/movies

Expected behavior I would expect the python libraries installed in the docker container to work regardless of the user executing them.

Screenshots Screenshot from 2024-03-11 16-19-37

Stash Version: v0.25.0

Desktop (please complete the following information):

Additional context my Dockerfile to work around the issue if it helps at all.

FROM stashapp/stash:latest RUN apk add py3-beautifulsoup4 curl; cp -r /root/.local/lib/python3.11/site-packages/cloudscraper* /usr/lib/python3.11/site-packages/;

feederbox826 commented 1 month ago

Ah. The pip installs are --user scoped.

4300 is the long-term goal but venv's don't seem to work with non-interactive non-terminal user switching