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

Use custom conda environment in Jupyter Notebook when user wants to use it #2050

Merged

Conversation

mathbunnyru
Copy link
Member

Describe your changes

Based on: #2049
All the credit goes to @benz0li

Issue ticket if applicable

Checklist (especially for first-time contributors)

  • I have performed a self-review of my code
  • If it is a core feature, I have added thorough tests
  • I will try not to use force-push to make the review process easier for reviewers
  • I have updated the documentation for significant changes

benz0li and others added 4 commits December 5, 2023 23:33
- to activate the custom environment
- for the respective Jupyter Notebook and Jupyter Console

Signed-off-by: Ayaz Salikhov <[email protected]>
@mathbunnyru
Copy link
Member Author

I checked the image and /home/${NB_USER}/.local/share/jupyter/kernels/python310/kernel.json looks nice.

@benz0li please review 🙂

@mathbunnyru
Copy link
Member Author

As I said in the PR title all the credit goes to you.
I think it's a really nice change and our custom environment recipe is now really close to perfect 🙂
Thank you!

If we will need to add more env variables, it will be easier with Python implementation and the code is much more readable in general.

@benz0li
Copy link
Contributor

benz0li commented Dec 6, 2023

ℹ️ The default kernel has indent=1:

cat /opt/conda/share/jupyter/kernels/python3/kernel.json
{
 "argv": [
  "/opt/conda/bin/python",
  "-m",
  "ipykernel_launcher",
  "-f",
  "{connection_file}"
 ],
 "display_name": "Python 3 (ipykernel)",
 "language": "python",
 "metadata": {
  "debugger": true
 }
}

@benz0li
Copy link
Contributor

benz0li commented Dec 6, 2023

@mathbunnyru See my comments. Thank you.

@mathbunnyru
Copy link
Member Author

ℹ️ The default kernel has indent=1:

cat /opt/conda/share/jupyter/kernels/python3/kernel.json
{
"argv": [
 "/opt/conda/bin/python",
 "-m",
 "ipykernel_launcher",
 "-f",
 "{connection_file}"
],
"display_name": "Python 3 (ipykernel)",
"language": "python",
"metadata": {
 "debugger": true
}
}

Thank you. Fixed indent.

@mathbunnyru
Copy link
Member Author

mathbunnyru commented Dec 6, 2023

The build failure comes from the issue(s) mentioned in mamba-org/mamba#3036.

The recipe is expected to fail before images are updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants