ddPn08 / Radiata

Stable diffusion webui based on diffusers.
https://ddpn08.github.io/Radiata/
Apache License 2.0
984 stars 68 forks source link

Docker is not creating a user when creating lsmith_lsmith resulting in root access to the filesystem. #57

Closed cuphi closed 1 year ago

cuphi commented 1 year ago

Describe the bug

Docker is not creating a user when creating lsmith_lsmith resulting in root access to the filesystem. laz@kerchunk:~/store/Lsmith> ls -hal total 164K drwxr-xr-x 12 laz users 4.0K Feb 18 17:07 . drwxr-xr-x 10 laz users 4.0K Feb 18 14:45 .. -rw-r--r-- 1 laz users 94 Feb 18 14:45 .dockerignore drwxr-xr-x 9 laz users 4.0K Feb 18 14:45 .git drwxr-xr-x 4 laz users 4.0K Feb 18 14:45 .github -rw-r--r-- 1 laz users 165 Feb 18 14:45 .gitignore -rw-r--r-- 1 laz users 128 Feb 18 14:45 .gitmodules -rw-r--r-- 1 laz users 128 Feb 18 14:45 .pre-commit-config.yaml -rw-r--r-- 1 laz users 7 Feb 18 15:32 .python-version -rw-r--r-- 1 laz users 12K Feb 18 14:45 LICENSE drwxr-xr-x 5 laz users 4.0K Feb 18 14:45 api -rw-r--r-- 1 laz users 705 Feb 18 14:45 build.py drwxr-xr-x 2 laz users 4.0K Feb 18 14:45 docker -rw-r--r-- 1 laz users 467 Feb 18 14:45 docker-compose.yml drwxr-xr-x 4 root root 4.0K Feb 18 17:16 docker-data drwxr-xr-x 9 laz users 4.0K Feb 18 14:45 docs drwxr-xr-x 4 laz users 4.0K Feb 18 14:45 frontend -rw-r--r-- 1 laz users 113 Feb 18 14:45 launch-user.bat -rw-r--r-- 1 laz users 153 Feb 18 14:45 launch-user.sh -rw-r--r-- 1 laz users 2.0K Feb 18 14:45 launch.bat -rw-r--r-- 1 laz users 6.8K Feb 18 14:45 launch.py -rwxr-xr-x 1 laz users 1.4K Feb 18 14:45 launch.sh drwxr-xr-x 3 laz users 4.0K Feb 18 14:45 lib drwxr-xr-x 5 laz users 4.0K Feb 18 14:45 modules -rw-r--r-- 1 laz users 437 Feb 18 14:45 package.json -rw-r--r-- 1 laz users 106 Feb 18 14:45 pyproject.toml -rw-r--r-- 1 laz users 4.2K Feb 18 14:45 readme.md -rw-r--r-- 1 laz users 352 Feb 18 14:45 requirements.txt drwxr-xr-x 3 laz users 4.0K Feb 18 14:45 submodules -rw-r--r-- 1 laz users 30K Feb 18 14:45 yarn.lock

Not the owner and group of the docker-data folder above. To fix this simply have the docker file create a new user:

https://stackoverflow.com/questions/50317119/docker-container-creating-directories-owned-by-root-i-need-them-owned-by-10001

Reproduction

Install the Docker container for this project. It is 100% reproducible.

Expected behavior

To run as the local, logged in user and not have root privileges.

System Info

Python 3.10.7 OpenSuse Leap 15.4 Current release

Additional context

No response

Validations

ddPn08 commented 1 year ago

Closing this issue as the project has been significantly updated. Please reopen if you still have problems.