-
Notifications
You must be signed in to change notification settings - Fork 362
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
repo2docker fails to launch into jupyter lab properly from valid minimal Dockerfile #1231
Comments
I don't understand things yet, but it seems that there is some interaction effect between # Install necessary jupyter dependencies
# Install jupyterhub to allow use of the repository with an authenticated Binder
RUN python -m pip --no-cache-dir install --upgrade pip setuptools wheel && \
- python -m pip --no-cache-dir install jupyter jupyterlab jupyterhub && \
+ python -m pip --no-cache-dir install jupyter jupyterlab jupyterhub 'jupyter-server<2.0.0' && \
command -v python && \
python -m pip list I'm poking on this over at matthewfeickert/failing-repo2docker-with-dockerfile#4. |
I have failing and passing |
This sounds like an upstream problem jupyter-server/jupyter_server#1038 |
* Add minimal Dockerfile for repo2docker to build and launch successfully from matthewfeickert/pythia-python:pythia8.308. - Constrain 'jupyter-server<2.0.0' to avoid jupyterhub/repo2docker#1231 and jupyter-server/jupyter_server#1038 * Add binder_repo2docker Make target for local building with repo2docker. * Add Binder launch badge to README.
Bug description
When
repo2docker
2022.10.0
builds a valid minimal Dockerfile and then attempts to launch into it with (I think?)it fails to enter into the launcher environment and is blocked by a token authentication screen that is not bypassable with a valid token.
Expected behaviour
Launch into a Jupyter Lab environment similar to
repo2docker
having runActual behaviour
When launching the environment from the URL with the token presented the user is brought to a login screen shown below that notes "Token authentication is enabled".
If the user tries to log in with the token in the URL they are not able to.
How to reproduce
This repo provides a full minimal failing example: https://github.com/matthewfeickert/failing-repo2docker-with-dockerfile
The following is my writeup pasted from the MFE repo:
Minimal Failing Example:
Minimal Failing Example
The Dockerfile in this repository under
binder/
is a modified version of the example given in thebinder-examples/minimal-dockerfile
project.The modifications are minor in that it adopts
python:3.10-slim-bullseye
as the base image and installs all Python packages in aNB_USER
controlled virtual environment which is automatically activated as itsbin/
directory is on$PATH
.The rest of it follows the Preparing your Dockerfile section of the Use a Dockerfile for your Binder repository tutorial website.
The Dockerfile builds successfully when repo2docker is run locally on the repository
However, when launching the environment from the URL with the token presented the user is brought to a login screen shown below that notes "Token authentication is enabled".
If the user tries to log in with the token in the URL they are not able to.
From the tutorial it seems that
repo2docker
is running the equivalent ofafter it builds the image. For simplicity of naming, if we retag the image
(or just build the image ourselves
)
and then run it as
repo2docker
iswe get the same issue.
It seems the problems stems from
--NotebookApp.default_url=/lab/
as if we run without this then we can run the classic Jupyter notebook environment fineand if we run with
jupyter lab
things work fineI understand from the tutorial that the
--NotebookApp.default_url=/lab/
is required for Binder to act as a safeguard asbut it seems there is some interaction problem here for
repo2docker
.this is also cross-posted with binder-examples/minimal-dockerfile#8 (comment).
Your personal set up
docker version
repo2docker --version
The text was updated successfully, but these errors were encountered: