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

Shorten path to notebook work directory? #23

Closed
parente opened this issue Aug 31, 2015 · 9 comments
Closed

Shorten path to notebook work directory? #23

parente opened this issue Aug 31, 2015 · 9 comments

Comments

@parente
Copy link
Member

parente commented Aug 31, 2015

Currently, the notebook working directory is in /home/jovyan/work which is borrowed from the original setup from the original http://github.com/jupyter/docker-demo-images Dockerfile. It has been raised that this path is a bit long (#21 (comment)) and that it introduces an extra if block check in the start-notebook.sh script to copy in skeleton files post jovyan user creation in the case where the work directory is host mounted.

The first problem might be something we can change albeit at the cost of breaking existing users of the image. The second problem is not exclusive to the notebook directory location, however: if the user host mounts a Jupyter config or any other file in the home directory, the skeleton file copy logic is required.

Anything we can / should do?

@rgbkrk
Copy link
Member

rgbkrk commented Sep 1, 2015

Would it be ok if the default working directory was /home/jovyan/?

@parente
Copy link
Member Author

parente commented Sep 1, 2015

I forgot to /cc @costerwi who requested this change originally.

My vote: Leave it as is. It's not complicating anything in the startup script. We'd still need the skeleton logic to deal with jupyter config files, extensions, etc. that the user decides to mount at docker run time in the jovyan home dir before the dir gets created on container start. (Selfish hat on ...) Plus I know of a number of users of these containers internally here who will grumble if the path suddenly changes without an associated image version change.

@rgbkrk
Copy link
Member

rgbkrk commented Sep 1, 2015

Sounds good to me. I've enjoyed the vision and direction you've laid out here, and a single directory is much cleaner (no dotfiles, misc. config, etc. showing on the dashboard)

@costerwi
Copy link
Contributor

costerwi commented Sep 1, 2015

I initially separated the /notebooks directory because it was created in the Dockerfile before the jovyan user was added by the script. I made it writable by the group users which jovyan would eventually join. #16

It seems messy to have the notebooks intertwined within /home/jovyan but I don't have a strong argument against the current momentum. I have no limitations in the current image.

@costerwi
Copy link
Contributor

costerwi commented Sep 2, 2015

A potential benefit for creating a separate notebook directory within the Dockerfile (before jovyan and their home directory exists) is that it would allow dependent images to easily COPY starter notebooks into that directory. Of course, this is solvable in other ways as well.

@parente
Copy link
Member Author

parente commented Sep 2, 2015

What if the minimal-notebook Dockerfile does create the /home/jovyan/work directory? Then subimages could COPY files in there. And at runtime, I think the start-notebook.sh logic is already set to fix permissions and adapt to the fact that directory already exists.

Solves both the problem of subimages wanting to copy config files into ~/.jupyter and notebooks into ~/work in one fell swoop.

@costerwi
Copy link
Contributor

costerwi commented Sep 3, 2015

Yes, I think that would be a working option. You don't need to change minimal-notebook; any subimage could copy into those directories.

@parente
Copy link
Member Author

parente commented Sep 4, 2015

Confirmed that subimages can COPY or ADD files anywhere in /home/jovyan and the start script will properly deal with them. Needs to be doc'ed in the READMEs.

@parente
Copy link
Member Author

parente commented Sep 13, 2015

Think we agreed to keep path as-is. Current stack setup should allow COPY/ADD from Dockerfiles or mounting from host without any issues.

@parente parente closed this as completed Sep 13, 2015
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

3 participants