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

No Python support in Docker? #1

Closed
bunny1985 opened this issue Apr 18, 2021 · 8 comments
Closed

No Python support in Docker? #1

bunny1985 opened this issue Apr 18, 2021 · 8 comments

Comments

@bunny1985
Copy link
Contributor

First of all thank you for your great work. I'm testing how it looks like
Hi As far as I can see there is no python3 installed so no plugins will work.
I think it could be changed,
( one line in dockerfile)
For now I will have to build on top of this :)

@gizmocuz gizmocuz changed the title No ptyhon support ? No Python support in Docker? Apr 19, 2021
@gizmocuz
Copy link
Contributor

@bunny1985 , thanks for reaching out! If you could help with this please go ahead... I'm quite new to docker and already happy I could make this ;)
If you want you can create a PR for the docker repository

@gizmocuz
Copy link
Contributor

Just had a quick look at the dockerfile, it installs 'libpython3.7-dev' , maybe it's the wrong library and we need to change this to 'libpython3.7' ?

@bunny1985
Copy link
Contributor Author

#2
I have created pull request, however it's a quick edit in browser - will check that later and let you know.

@gizmocuz
Copy link
Contributor

Thanks! Could it be that python was detected from my host system? Because my Domoticz docker installations shows it detected python.

image

Another question, if a docker user needs a special module (or multiple) do you know a way how this can be installed ? Maybe a startup script that looks inside the userdata folder launched at startup ?

@bunny1985
Copy link
Contributor Author

i think that domoticz checks libpython version, not that python executable is there
For python modules (packages) I have added additional "pip install" line
I have to check if you need to set "alternatives" as well.
I would suggest adding additional mount point to "plugins" directory in docker-compose.

@gizmocuz
Copy link
Contributor

@bunny1985, If all is working correctly, you have to create a directory 'plugins' in the userdata folder and all plugins are loaded from here.

I meant like if you have a plugin that depends on 'module_xyz' to be installed, it would be nice that when the docker goes 'up' that it will install 'module_xyz'

If we had a script in the userdata folder (like init_startup.sh for example) that was executed when the docker goes 'up' we could for example in here 'pip3 install module_xyz' and other actions

@ajarzyn
Copy link

ajarzyn commented Oct 11, 2022

Nice to join this thread:

Can we use this here:
https://github.com/linuxserver/docker-baseimage-ubuntu/blob/bionic/root/etc/cont-init.d/99-custom-scripts

That way it would be possible to customize runscripts and additional services.
Is it ok to copy something from other repo?

@waltervl
Copy link
Contributor

@bunny1985, If all is working correctly, you have to create a directory 'plugins' in the userdata folder and all plugins are loaded from here.

I meant like if you have a plugin that depends on 'module_xyz' to be installed, it would be nice that when the docker goes 'up' that it will install 'module_xyz'

If we had a script in the userdata folder (like init_startup.sh for example) that was executed when the docker goes 'up' we could for example in here 'pip3 install module_xyz' and other actions

Fixed with #12
Issue can be closed (I have no rights here)

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