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

avoid interactive prompts when updating from an environment.yaml #727

Merged
merged 4 commits into from
Feb 3, 2025

Conversation

jameslamb
Copy link
Member

@jameslamb jameslamb commented Jan 29, 2025

Working with @taureandyernv yesterday, we tried something like this to patch in a dependency at run time.

cat > ./environment.yml <<EOF
channels:
- dglteam/label/th23_cu121
dependencies:
- dgl
EOF

docker run \
  --rm \
  -v $(pwd)/environment.yml:/home/rapids/environment.yml \
  -it rapidsai/base:25.02a-cuda12.5-py3.12 \
  conda env export

Found that that prompts for confirmation:

  Package           Version  Build    Channel                       Size
──────────────────────────────────────────────────────────────────────────
  Install:
──────────────────────────────────────────────────────────────────────────

  + dgl    2.4.0.th23.cu121  py312_0  dglteam/label/th23_cu121     295MB

  Summary:
  Install: 1 packages
  Total download: 295MB

──────────────────────────────────────────────────────────────────────────

Confirm changes: [Y/n]

But that prompt seems not to make it through to mamba.

And even if that did work, this interactive prompt prevents the use of the "mount in an environment.yml" approach in situations where you aren't running the container interactively... for example, where you want to use this image in a container in a Kubernetes Pod, and provide an environment.yml via a ConfigMap or file Secret.

This proposes skipping the confirmation and always running mamba env update -y when an environment.yml is provided.

Notes for Reviewers

How I tested this

Pulled an image built from this PR and confirmed that that install pattern described above works and does not prompt for interactive input.

cat > ./environment.yml <<EOF
channels:
- dglteam/label/th23_cu121
dependencies:
- dgl
EOF

docker run \
  --rm \
  -v $(pwd)/environment.yml:/home/rapids/environment.yml \
  -it rapidsai/staging:docker-727-25.02a-cuda12.5-py3.12 \
  conda env export
...
  - dgl=2.4.0.th23.cu121=py312_0
...

@jameslamb jameslamb added the bug Something isn't working label Jan 29, 2025
@jameslamb jameslamb self-assigned this Jan 29, 2025
@jameslamb jameslamb changed the title WIP: avoid interactive prompts when updating from an environment.yaml avoid interactive prompts when updating from an environment.yaml Jan 29, 2025
@jameslamb jameslamb marked this pull request as ready for review January 29, 2025 16:32
@jameslamb jameslamb requested a review from a team as a code owner January 29, 2025 16:32
@jameslamb jameslamb requested a review from msarahan January 29, 2025 16:32
@jameslamb
Copy link
Member Author

This is blocked by #726

@@ -31,6 +31,8 @@
# context on these being skipped: https://github.com/rapidsai/cuspatial/pull/1407
'cuspatial/cuspatial_api_examples.ipynb',
'cuspatial/nyc_taxi_years_correlation.ipynb',
# details: https://github.com/rapidsai/docker/issues/726
'cuspatial/trajectory_clustering.ipynb',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposing that we skip this notebook as well, to get CI working here.

The work of getting this working is described in #726.

context/test_notebooks.py Outdated Show resolved Hide resolved
context/test_notebooks.py Outdated Show resolved Hide resolved
@bdice
Copy link
Contributor

bdice commented Feb 3, 2025

/merge

@rapids-bot rapids-bot bot merged commit edcacd1 into rapidsai:branch-25.02 Feb 3, 2025
61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants