-
Notifications
You must be signed in to change notification settings - Fork 11
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
src(buildpack): add python #60
Conversation
This commit adds a python buildpack and simple invoker. This is a work in progress. Existing issues: - Extremely slow on first build (>10 minutes) - Attempt to install python 3.8 on UBI images results in 3.6? - The installed pip is very old - No user dependencies capability yet
@lance any idea why? |
@zroubalik really no idea why it's so slow. It happens when pulling in dependencies for flask, etc. If you can try a build locally and let me know if you see the same that would be great. |
@zroubalik it should be running for CE now |
This causes the flask app to run in production mode. Signed-off-by: Lance Ball <[email protected]>
Signed-off-by: Lance Ball <[email protected]>
@matejvasek @zroubalik ptal - I think this might be ready to land. The first three issues noted in the PR description are... 🤷 |
Considering creating and publishing a python package for the server so that we can support local testing and running on localhost similar to the Node.js buildpack. |
Signed-off-by: Lance Ball <[email protected]>
https://github.com/boson-project/parliament Sample usage:
|
@lance
I don't know why, |
|
Hmm maybe I checked out wrong remote for this. |
Strange... I definitely ran this BP over and over again last week. |
Oh, sorry. I have not updated that. You should pull from the |
@lance It's my fault I wrongfully assumed it's from your repo, the PR is OK, I think. |
Yup it works from |
@lance the python Function seems to react to |
Also I noticed that the python Function runs under user id |
Good catch, we should probably unify this, at least for the sake of consistency |
Hmm this is confusing. Shouldn't they all run as user 1000? buildpacks/stacks/ubi8/base/Dockerfile Lines 3 to 12 in 10100d5
|
Yes it should. Let me double check that. Maybe I used different docker daemons in different console windows. I sometimes use |
I am a little stumped by this. The ENTRYPOINT command is
If I run the equivalent commands locally and send
Do you think it would be OK if we don't let this block landing the PR, and instead open an issue for it? I did confirm that, for whatever reason, |
@lance With regard to UID -- it was indeed caused by using |
👍 I think that's OK. It's not any critical it will only prolong ksvc shutdown I think. I can confirm, local run with sigterm work, but it doesn't work in container. |
Added an issue for |
LGTM |
Just one thing. I tried local development using venv. I created env in the project directory.
I think that we somehow should let user know he is not supposed create |
@matejvasek do you know if that is standard practice for Python devs? When I was making all of this, I set up an environment in ~/src/environments and of course did not see this issue. |
Don't know, jetbrains IDE did that for me, but now I see it's creating |
|
Then it's all right I think. |
This commit adds a python buildpack and simple invoker. This is awork in progress. Existing issues:
No user dependencies capability yetOnly CloudEvents functions are supported at the momentStill needs a production runtime - at the moment, it's development mode only