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

Running locally - any risks with the user "jovyan"? #28

Closed
Jollyhrothgar opened this issue Sep 13, 2020 · 6 comments
Closed

Running locally - any risks with the user "jovyan"? #28

Jollyhrothgar opened this issue Sep 13, 2020 · 6 comments

Comments

@Jollyhrothgar
Copy link

I found this repo after a lot of struggling with setting up a docker image where I could run GPU accelerated TensorFlow with all the various creature comforts I've grown used to (jupyter lab plugins, access to local storage, modify which local files are shared or not, etc). You can see my pitiful attempts to set up here, but it looks like you folks have solved most of the problems I've encountered already.

It seems like this repo contains everything one would need to get started - but I had some concerns about running the setup scripts on my local machine - there are a lot of references to a specific username "jovyan", hard-coded local directory structure, as well as modifications to the passwd file.

I'm curious if this repo has been configured for one person to run and I'm just looking at a public repo of a passion project, or if its ok to run on my local machine without clobbering the passwd file with stuff that will mess up my ability to login?

Thanks!!

@mathematicalmichael
Copy link
Contributor

you're good. you came to the right place, friend. we too have struggled and this repo is meant to be a shortcut to success through the magic of (nvidia-)docker.

it's meant for public consumption and is a gpu-based version of jupyter/docker-stacks, and will eventually mirror the naming conventions of that project more closely. jovyan is a "Jupyter inside joke" and refers to a "user of jupyter"
Like that project, the idea is to mount all "work" that is meant to persist in /home/jovyan/work in the container.

jovyan is just the username of the account you'll have in the container once you launch it. It's mapped to UID 1000 so any files you create under it will appear as if they belong to whomever is mapped to that UID on your system.

@mathematicalmichael
Copy link
Contributor

@Jollyhrothgar
Copy link
Author

Thanks - I set it all up and got it running - so awesome. Its great to see projects like this - worked like a charm for me. Any advice for how to modify to further customize? I've been basically just modifying the Dockerfile under .build to add some additional libraries (e.g. tensorflowdataset, a vim-code-cell plugin) - but the rebuild takes about an hour+ for each change.

I can see that I can specify sub-components that I want to build (for example, I don't really use R, Julia, or docker-swarms) - any advice on how to sort of quickly customize this into a lean-er package that fits like a glove? I can also just do some trial/error/googling, but in case I'm missing some short-cut, I thought I'd ask.

Thanks again!

@mathematicalmichael
Copy link
Contributor

mathematicalmichael commented Sep 14, 2020

Happy to hear that!

You can add things on to the bottom of the resulting dockerfile (see ./generate-dockerfile for more info), to take advantage of docker's caching layers feature to speed up builds.

What you're asking for re: the packaged languages will be addressed in #27 (so, give it a couple months then consult the readme), but currently is supported by using the flags for slim images: #16 (comment) I think you notably want to exclude the datascience stack, which won't be part of the new default.

@ChristophSchranz
Copy link
Collaborator

Thanks @Jollyhrothgar!

There are options to reduce the size of the image.
In particular, you can generate a Dockerfile in .build/ without Julia and R if you run:

bash generate-Dockerfile.sh --no-datascience-notebook

and without the additional languages and packages with:

bash generate-Dockerfile.sh --slim

It is true that most people here will use Python only. I'll improve the description and change the default example.

See section Parameter for more information.

@ChristophSchranz
Copy link
Collaborator

I close this issue as i think all points are clear now. Reopen if not.

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