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

set CONDA_DEFAULT_ENV #690

Merged
merged 3 commits into from May 24, 2019

Conversation

@minrk
Copy link
Member

commented May 24, 2019

so that conda install commands affect the kernel environment instead of the base env

This should preserve conda install behavior for Dockerfiles that inherit from r2d images.
This behavior is already managed at runtime by the ENTRYPOINT which properly activates the env.

cc @tam203 who reported the issue on gitter

I'm still testing this locally, and trying to think of a reasonable way to include an automated test for this.

minrk added 2 commits May 24, 2019
set CONDA_DEFAULT_ENV
so that `conda install` commands affect the kernel environment instead of the base env

This should preserve `conda install` behavior for Dockerfiles that inherit from r2d images.
This behavior is already managed by the ENTRYPOINT which properly activates the env.
@minrk

This comment has been minimized.

Copy link
Member Author

commented May 24, 2019

Added a test that covers postBuild, which is currently equivalent to the reported RUN conda install ..., but not strictly the same since we could in the future add activation-wrappers around running postBuild, but not downstream RUN.

# make sure CONDA_DEFAULT_ENV is the *kernel* env
# so that `!conda install PKG` installs in the kernel env
# where user packages are installed, not the notebook env
# which only contains UI when the two are different

This comment has been minimized.

Copy link
@betatim

betatim May 24, 2019

Member

I had to read this a few times for it to make sense but I can't suggest a different wording that is easier to parse :-/

You always want to install into the "kernel env" and never into the "notebook env", but sometimes the two are the same in which case you are still installing into the kernel env, it just happens to also be the notebook env. You just gotta have your wits about you with all these envs :)

@betatim

This comment has been minimized.

Copy link
Member

commented May 24, 2019

I think it is fine that we don't have a perfect test as it gets a bit involved to create one that does actually test the full thing. Worth creating an issue for this? Dunno.

LGTM, waiting for travis

@betatim betatim merged commit 80b979f into jupyter:master May 24, 2019

5 checks passed

ci/circleci: build_docs Your tests passed on CircleCI!
Details
ci/dockercloud Your tests passed in Docker Cloud
Details
codecov/patch 100% of diff hit (target 20%)
Details
codecov/project 91% (+0.02%) compared to 91309ca
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jhamman jhamman referenced this pull request May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.