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

Add input argument to control custom python envs #10

Open
neergaard opened this issue Jul 12, 2018 · 8 comments
Open

Add input argument to control custom python envs #10

neergaard opened this issue Jul 12, 2018 · 8 comments

Comments

@neergaard
Copy link

First off, this is great and much better than what I had made for myself.

Second, something that I thought was nice was the option to specify a conda environment to activate before running the notebook. I've implemented something basic, but I don't know it is something that is good for general use.

@raphtown
Copy link
Contributor

Hey aneergaard! If you have an sbatch script that uses conda environments + notebooks, you can totally submit it as a PR. Probably just have the conda env specified as an additional input to the sbatch script.

@vsoch
Copy link
Owner

vsoch commented Aug 10, 2018

hey @aneergaard ! I've taken over maintainer for this repo, and I think the repo2docker-conda would fit the bill for you to use, and then use the sherlock/singularity-notebook.sbatch with it. Do you want to give it a try? Here is the repo2docker-conda template you would want to start with --> https://github.com/vsoch/repo2docker-conda

@zqfang
Copy link
Contributor

zqfang commented Feb 7, 2020

thank you very much for this repo @vsoch. I've manngered to use my own conda env and train my model. Follow these steps, you could use any conda env you want.

  • Step1: install Miniconda on sherlock, and create the conda env you want
  • Step2: add different envs to the jupyter kernel
  • Step3: create your jupyter.gpu.sbatch like this
#!/bin/bash

PORT=$1
NOTEBOOK_DIR=$2
if [ -z "$NOTEBOOK_DIR" ]; then
    cd $SCRATCH
else
    cd $NOTEBOOK_DIR
fi

module load gcc/7.3.0
module load gdb
module load cmake
module load cuda/10.1.168
module load cudnn/7.6.4
module load nccl

conda activate fastai # use the env you've created !
jupyter lab --no-browser --port=$PORT # I use jupyterlab

@vsoch
Copy link
Owner

vsoch commented Feb 8, 2020

This is really useful! Do you want to add a recipe, or write this up as a note in the README documentation?

@zqfang
Copy link
Contributor

zqfang commented Feb 8, 2020

I just create my own conda envs and follow your tutorial. I could make a PR if you need a recipe @vsoch

@vsoch
Copy link
Owner

vsoch commented Feb 8, 2020

I'd love that, if you have the bandwidth. I think your derivation (with cuda) is more akin to what would be a real world example, and helpful for others! There is definitely no rush, but I'll be excited to share widely when it's ready. I can also offer to help however you might need it, hopefully should be fairly straight forward to write the markdown!

@zqfang
Copy link
Contributor

zqfang commented Feb 11, 2020

@vsoch , I've add a recipe in my repo: https://github.com/zqfang/forward/blob/master/recipe.sherlock-gpu.md .

Where should I put this file? I could submit a PR if needed

@vsoch
Copy link
Owner

vsoch commented Feb 11, 2020

I think it would be appropriate to add to the Tiny Tutorials section - what do you think?

If you don't intend to keep the repository, you can add an examples folder at the root here and drop the file there (and link from tiny tutorials) otherwise, a link should work :)

vsoch pushed a commit that referenced this issue Feb 11, 2020
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

4 participants