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

Not Working On Rpi4 #90

Open
ImAlwaysInFaMouS opened this issue Jul 28, 2024 · 6 comments
Open

Not Working On Rpi4 #90

ImAlwaysInFaMouS opened this issue Jul 28, 2024 · 6 comments
Labels
installation waiting for info Issue is waiting for info from users

Comments

@ImAlwaysInFaMouS
Copy link

 error: externally-managed-environment

× This environment is externally managed
   To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    For more information visit http://rptl.io/venv

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

After using: sudo pip install --break-system-packages -r requirements

Successfully installed Flask-Login-0.6.3 Jinja2-3.1.4 MarkupSafe-2.1.5 PyYAML-6.0.1 Werkzeug-3.0.1 blessed-1.20.0 blinker-1.8.2 enlighten-1.12.4 flask-3.0.0 flask-sqlalchemy-3.1.1 greenlet-3.0.3 itsdangerous-2.2.0 prefixed-0.7.1 pycryptodome-3.20.0 requests-2.31.0 sqlalchemy-2.0.31 typing-extensions-4.12.2 unzip_http-0.4 watchdog-4.0.1 wcwidth-0.2.13 zstandard-0.23.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

Then we try to sudo docker compose up -d

_ownfoil_logs.txt

@a1ex4
Copy link
Owner

a1ex4 commented Jul 28, 2024

I don't get it, how are you trying to run Ownfoil? With docker or simply Python?

@ImAlwaysInFaMouS
Copy link
Author

ImAlwaysInFaMouS commented Jul 28, 2024

Docker.

https://www.raspberrypi.com/documentation/computers/os.html#python-on-raspberry-pi

It's a bookwork issue I'm guessing, so downgrading rpi OS should work?

Will have to test later.

@a1ex4
Copy link
Owner

a1ex4 commented Jul 31, 2024

I don't see how "bookwork" can impact Ownfoil is you are using Docker to run it. When using Docker, it will download an image that contains everything that is needed for Ownfoil to run, so all the Python libraries are already included.

Normally if you just use docker, i.e. you create a docker-compose as in the README and then use docker-compose up command, it should not do any operation regarding the installation of Python packages.

I've pushed some changes to the RPI images, can you test again, without using any tag in the image?

@ImAlwaysInFaMouS
Copy link
Author

ImAlwaysInFaMouS commented Jul 31, 2024

Yes I use Docker.

pi@raspberrypi:~/nas1 $ sudo docker run -d -p 8465:8465 -v /home/pi/nas1/games:/games /home/pi/nas1/config:/app/config --name ownfoil a1ex4/ownfoil
docker: invalid reference format.
See 'docker run --help'.

so I

sudo nano docker-compose.yml

paste:

version: "3"

services:
ownfoil:
container_name: ownfoil
image: a1ex4/ownfoil
environment:
# For write permission in config directory
- PUID=1000
- PGID=1000
volumes:
- /home/pi/nas1/games:/games
- /home/pi/nas1/config:/app/config
ports:
- "8465:8465"

pi@raspberrypi:~/nas1 $ docker-compose up -d
-bash: docker-compose: command not found

So i tried to:

pi@raspberrypi:~/nas1 $ docker compose up -d

WARN[0000] /home/pi/nas1/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
[+] Running 14/14
 ✔ ownfoil Pulled                                                                                                                                                                                           
   ✔ 690e87867337 Pull complete                                                                                                                                                                              
   ✔ 2711f91d5f9c Pull complete                                                                                                                                                                              
   ✔ 295e5a578ce9 Pull complete                                                                                                                                                                              
   ✔ 52bfa99e5076 Pull complete                                                                                                                                                                             
   ✔ c898ad883ec8 Pull complete                                                                                                                                                                             
   ✔ 94f449ece0a3 Pull complete                                                                                                                                                                             
   ✔ 059a069b1b62 Pull complete                                                                                                                                                                             
   ✔ 6a25027e341b Pull complete                                                                                                                                                                             
   ✔ f18364fda697 Pull complete                                                                                                                                                                             
   ✔ 2a2db5ac4b38 Pull complete                                                                                                                                                                             
   ✔ ac6f7f67fd5e Pull complete                                                                                                                                                                             
   ✔ 4f4fb700ef54 Pull complete                                                                                                                                                                             
   ✔ 6b2e326ea110 Pull complete                                                                                                                                                                             
[+] Running 2/2
 ✔ Network nas1_default  Created                                                                                                                                                                             
 ✔ Container ownfoil     Started            

Container is made, runs, dies with the same error.

IDK why either, like you said it should all be "contained" ¯_(ツ)_/¯

@a1ex4
Copy link
Owner

a1ex4 commented Jul 31, 2024

Can you try to:

  1. Set the PUID and PGID values to the output of the id command, executed with the ˋpi` user
  2. Run ˋsudo chmod -R 777 /home/pi/nas1/config`

Run the docker command again and post the logs if it still fails?
From what I can tell the pi user should already be 1000:1000 but it's just to be sure.

@laleeroy
Copy link

laleeroy commented Sep 8, 2024

Mine is working perfectly fine in docker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation waiting for info Issue is waiting for info from users
Projects
None yet
Development

No branches or pull requests

3 participants