-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add devcontainer #15909
Add devcontainer #15909
Conversation
Thanks for making a pull request to jupyterlab! |
@trungleduc do you mind reviewing this? Especially to check I did not break the docker dev workflow? |
Maybe this will also help address some comments from this discussion: #13049 |
Maybe there is a way to put this under test on CI? |
the docker setup is tested https://github.com/jupyterlab/jupyterlab/actions/runs/8139526094 |
Thanks @fcollonval |
for more information, see https://pre-commit.ci
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.
Thanks!
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// Populate the yarn cache | ||
"postCreateCommand": "micromamba run pip install -e .", |
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.
Maybe with the dev
extra?
"postCreateCommand": "micromamba run pip install -e .", | |
"postCreateCommand": "micromamba run pip install -e \".[dev]\"", |
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.
That step is needed only to build the JavaScript assets. All python dependencies are stored in a dedicated layer:
# Install all python dependencies only with pip to maximize using its cache
RUN --mount=type=cache,target=/jupyterlab/pip-cache,uid=${NEW_MAMBA_USER_ID},gid=${NEW_MAMBA_USER_GID} \
PIP_CACHE_DIR="/jupyterlab/pip-cache" SKIP_JUPYTER_BUILDER=1 micromamba run python -m pip install -e ".[dev,docs,test]" && \
cd / && \
rm -rf /home/$MAMBA_USER/jupyterlab_cache
So no need for the extra there.
I had the same impression. In the follow-up #15916, I plan to store the base docker image on the GitHub registry, in order to speed up the docker build through cache reuse (option build.cacheFrom). |
@meeseeksdev please backport to 4.1.x |
@meeseeksdev please backport to 4.0.x |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
Co-authored-by: Frédéric Collonval <frederic.collonval@webscit.com>
References
Add dev container set up to ease development and on boarding.
Code changes
Add devcontainer definition and tune the docker set up to share it.
User-facing changes
None
Backwards-incompatible changes
None