-
Notifications
You must be signed in to change notification settings - Fork 13
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
added simple docker docs #26
base: feature/docs-restructuring
Are you sure you want to change the base?
added simple docker docs #26
Conversation
actually it probably makes sense to have a separate builder stage with a prebuilt rust image, although it looks like this would require using the crate management flow instead of the highest level python/minimal rust flow |
Hi, great work! I'm planning to do some restructuring on the readme (maybe extracting stuff to the GitHub Wiki), since I feel like it's become way to long and one doesn't have a good overview anymore. So I'll merge your PR into my feature branch for this. In the Wiki we'd also have enough space to illustrate how to use a multi-stage dockerfile – if you'd be willing to draw up an example for that, please just add it to your PR. Otherwise, I'll do it once I find the time. Please let me know whether you'd like to work on this as well, so that I know when to merge :) Thanks for your contribution! |
@mityax i'm down to add a multistage example as well :) just a few questions: this would be separate from the combined python/rust version, correct? i think having a high level version that any python user can just plug into an existing dockerfile is super convenient, since their rust code would be able to continue to live entirely in the single |
Nice you're up for that :) I'm not entirely sure what your concern ist, so I'll just share my imagined workflow, which I think should work fine for single .rs files as well as crates: Builder Stage:
Final Stage:
Does this answer your question? If not, please explain again what you mean, so I can provide a better answer :) |
From some tryal btw, I think it's best to use apt update && apt install -y python3-pip
rm /usr/lib/python3.*/EXTERNALLY-MANAGED # required to install pip packages without the extra load of creating a venv
pip install --user rustimport This was pretty quick in my test and cargo and rust come preinstalled – after these three lines a simple test with rustimport worked out of the box :) |
this is all i needed for deployment so i figured i'd add it to the docs, feel free to edit however
thanks for this library :)