Skip to content

Known issues: preprocessing hiccups when run via jupyterhub #230

@zktuong

Description

@zktuong

Resurfacing this just in case

Discussed in https://github.com/zktuong/dandelion/discussions/146

Originally posted by zktuong April 29, 2021
So there's a couple of issues that may happen when running via a notebook initialized by jupyterhub if following the default tutorial:

python scripts like AssignGenes.py may complain that the file cannot be found and environmental variables set in ~/.bash_profile are not seen.

This can be fixed by doing this:

Open a terminal and use jupyter kernelspec list to find the folder for your kernel.

Available kernels:
  dandelion    /home/jovyan/.local/share/jupyter/kernels/dandelion

Go there and edit kernel.json, it should look something like this:

cd /home/jovyan/.local/share/jupyter/kernels/dandelion
vi kernel.json
{
 "argv": [
  "/home/jovyan/my-conda-envs/dandelion/bin/python",
  "-m",
  "ipykernel_launcher",
  "-f",
  "{connection_file}"
 ],
 "display_name": "Python (dandelion)",
 "language": "python"
}

Now edit that file and add an "env" key to that json. and add a dict with a "PATH" key to the binaries, as well as the other environmental variables, in your conda env like this:

{
 "argv": [
  "/home/jovyan/my-conda-envs/dandelion/bin/python",
  "-m",
  "ipykernel_launcher",
  "-f",
  "{connection_file}"
 ],
 "env": {
     "PATH": "/home/jovyan/my-conda-envs/dandelion/bin:$PATH",
     "GERMLINE": "/home/jovyan/Softwares/database/germlines/",
     "IGDATA": "/home/jovyan/Softwares/database/igblast/",
     "BLASTDB": "/home/jovyan/Softwares/database/blast/"
 } ,
 "display_name": "Python (dandelion)",
 "language": "python"
}

Restart the instance/kernel and it should start working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already existsquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions