Unable to get the right enviroment inside the jupyter

Hello,
I am trying to run my first pipeline with self hosted reana cluster.
The simple reana.yaml file is following:

version: 0.3.0
inputs:
  parameters:
    shrepo: https://github.com/arm2arm/starhorse_db.git
workflow:
  type: serial
  specification:
    steps:
      - environment: 'arm2arm/astro-aiko:latest'
        commands:
          - git clone "${shrepo}"
          - pip install --no-cache-dir --no-deps -r starhorse_db/requirements.txt --user
          - pip install papermill
           

This works without problem:

export REANA_WORKON=starhorse_db
reana-client validate
reana-client run -w starhorse_db
reana-client status
reana-client open -w starhorse_db.1  jupyter

But in the jupyter the python enviroment is different, not activated.
How to enable same enviroment in the project and the jupyter?

Hi @arm2arm, the open command opens the jupyter/scipy-notebook:notebook-6.4.5 environment image by default. If you have a custom Jupyter image that follows the same conventions as the upstream Jupyter images regarding port opening, you can pass the -i option to open your environment instead. Something like:

$ reana-client open -w starhorse_db.1 -i arm2arm/astro-aiko:latest jupyter

might work. Please see Opening sessions - Documentation

Note also that if you use Jupyter terminal and REANA stable helm release, you may need to manually switch directories to get into your workflow’s workspace (cd /var/reana/users/...). We fixed the terminal default directory in the REANA bleeding-edge development sources where the terminal now defaults to the workflow’s working directory. It’ll come with future release.

1 Like