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

Binder quick-start #55

Open
hehouts opened this issue Mar 11, 2023 · 1 comment
Open

Binder quick-start #55

hehouts opened this issue Mar 11, 2023 · 1 comment

Comments

@hehouts
Copy link

hehouts commented Mar 11, 2023

Hey, I made a binder!

And it wasnt as hard as I thought it would be! Maybe you want to make one too!

For context, this is the one I made: Lab 14 Binder. Its to teach a class on intro to command line for students that are pretty well versed in tidyverse, but only within R studio.

I followed this "Zero to Binder" tutorial (selected the R option), and it was fantastic.

Definitely there is some important thing to consider when your binder has large-ish files in it, and it has to do with making a PostBuild file. I didnt have that problem, so investigating how to do this is left as an exercise for the reader.

additionally, I yoinked some formatting from this cdfe binder set up: https://github.com/nih-cfde/training-rstudio-binder

Addtl useful tips from lab folks:

@ctb: "if you can get the conda environment right, that’s a critical step - and you can do it outside of a binder"
(I think I did that in mine, by making an .binder/environment.yml with the conda environment I wanted. I didnt really do anything to tell it to use conda, it just... worked!)

@jessicalumian:
"I’ve had problems with having a different version of python in my conda environment and on a terminal on JupyterLab.
When I need to create a new kernel for the jupyter environment this has worked for me:
Create virtual environment with mmh3 and sourmash and activate it.

# starting from (base) environment 
conda create -n mmh3_sourmash -c bioconda mmh3 sourmash
conda activate mmh3_sourmash
Install ipykernel, which can create kernel.json file needed by jupyter notebook to create a kernel with the virtual env software.
# inside (mm3_sourmash) environment
# used mamba because it solved issues that conda didn't
mamba install ipykernel
Register kernel spec
# inside (mm3_sourmash) environment
# ipython kernel install --user --name=new-env (I used the same name as conda virtual env for clarity)

ipython kernel install --user --name=mmh3_sourmash

Now the kernel mmh3_sourmash will be an kernel available to Jupyter."

@ctb
Copy link
Member

ctb commented Mar 11, 2023

this is fantastic, hannah - thanks!

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

No branches or pull requests

2 participants