Closed georges-schutz closed 2 years ago
@georges-schutz Can you check the current state of this PR. I do not see any changed files, but I would like to continue with it in the afternoon.
@georges-schutz Can you check the current state of this PR. I do not see any changed files, but I would like to continue with it in the afternoon.
The current script is submitted but not yet putting all the path to the environemnt Also the git submodule update --init is not yet done
This is the correct URL to start the binder for this PR https://mybinder.org/v2/gh/OpenSenseAction/OPENSENSE_sandbox_environment/main?urlpath=git-pull%3Frepo%3Dhttps%253A%252F%252Fgithub.com%252Fgeorges-schutz%252FOPENSENSE_sandbox_outsource_environment%26urlpath%3Dlab%252Ftree%252FOPENSENSE_sandbox_outsource_environment%252Fnotebooks%252Findex.ipynb%26branch%3Dmain
It does not work with sys.path.append
because this is only done temporarily.
We will need to do conda develop <directory>
for which the package conda-build
has to be installed (see https://stackoverflow.com/a/32748920/356463)
The start
script will be run from the env repo. I made a PR there.
Now trying to add the start
script to the env repo
this URL should be the correct one to get a binder based on the env repo from my PR in the env repo https://mybinder.org/v2/gh/cchwala/OPENSENSE_sandbox_environment/test_start_script?urlpath=git-pull%3Frepo%3Dhttps%253A%252F%252Fgithub.com%252Fgeorges-schutz%252FOPENSENSE_sandbox_outsource_environment%26urlpath%3Dlab%252Ftree%252FOPENSENSE_sandbox_outsource_environment%252Fnotebooks%252Findex.ipynb%26branch%3Dmain
We may need to add to the postBuild
(OPENSENSE_sandbox_environment) an element that recursively search's and runs start
scripts in order to keep the start
script in the content repository.
I am just not sure at what moment the postBuild
is running may be we need to put such a recursive start
script in the OPENSENSE_sandbox_environment repository.
The problem is that the nbgitpuller is probably pulling the content repo after everything is built. I am doing some testing right now. I will give an update within the next 30 minutes.
My current start script is trying to change to the content repo dir to init the submodules. But this fails, because the dir does not exist when the start script is run. That means that nbgitpuller is run after the start script.
Hence, we cannot run things in an automated way like this.
We could do a git clone of the content repo in the start script and not use nbgitpuller at all. But then we loose the flexibility to get different branches or forks as content in the binder.
What I will do now, is to add some sort if "init script" that manually has to be run in the first cell of the index notebook. That will allow us to have a working version for everybody via binder without running custom commands to set things up (submodule init, R installation, python paths).
Using the "init script" can work, but I have some issues with conda. If I run this script in the index.ipynb with !bash init.sh
it will run the command in a new bash which is in the default conda env and not the one that the notebook is running in...
Working on a fix...
Closing this, in the hope that #38 will provide a solution without investing more hours...
@georges-schutz Thanks for the effort you have put into splitting the repos and make things work.
We will have to revisit the problem with the initialization at some time...
This is linked to the issue https://github.com/OpenSenseAction/OPENSENSE_sandbox/issues/30