-
Notifications
You must be signed in to change notification settings - Fork 153
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
Allow loading modules in Docker image #17228
Conversation
This is done by mounting a `/modules` directory and installing packages into that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with this approach, I think it's the best one we have.
I seem to remember someone in some meeting ages ago had something they didn't like about it, but honestly it seems like the best option we have.
Might be worth noting that this approach won't work (smoothly, at least) for libraries with native dependencies.
Oh, hmm, true. I wonder if we should instead add a way of installing deps via the docker image (e.g. adding a new command to |
Current approach in this PR looks quite sane to me.
A lot of env uses a fresh container each time, which doesn't bode well with this proposal I believe. |
I think we do need an approach for native packages here, we don't necessarily need to add support immediately but we should ensure we're not painting ourselves into a corner. For example, I think the current approach will sometimes work, sometimes not for native packages, which is a huge footgun. Another thing we need to worry about is python versions, packages built for one version won't necessarily work after an upgrade.
Yeah, we'd want to ensure that the modules are installed into a volume I think. |
I'm not comfortable with this approach due to the aformentioned footguns of native packages / dependencies. I think there is a path forwards, but let's move this back to the issue. |
Oh yes good point I didn't understand it that way, with both the volume mount and the entrypoint in the python script it seems rather solid to me. TBH with this PR you can already just do The native deps became less of a problem also I think : if it manages to compile within the docker environment then it should just run fine ? |
This is done by mounting a
/modules
directory and installing packages into that.One choice that I made was to ensure that package versions in
/modules
do not override those installed by Synapse. This ensures that people using custom modules cannot accidentally install an incompatible version of a package.Closes #9944