Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Dockerfile with jupyter notebook support #202

Merged
merged 19 commits into from
Nov 27, 2018
Merged

Dockerfile with jupyter notebook support #202

merged 19 commits into from
Nov 27, 2018

Conversation

keineahnung2345
Copy link
Contributor

Hello,
In this PR, I add support to jupyter notebook, so that one can program from remote.
To make this work, one needs to run the image with nvidia-docker run -td -p 8888:8888 -e PASSWORD=<password> maskrcnn-benchmark-jupyter, in which one sets the password which is used by jupyter notebook. And then one can go to localhost:8888 and start programming.

I put the 3 repos(vision, cocoapi, maskrcnn-benchmark) inside the newly added folder "/notebooks", tell me if it needs to be changed.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Nov 23, 2018
@fmassa
Copy link
Contributor

fmassa commented Nov 23, 2018

cc @miguelvr as I don't know much about Dockerfiles

@miguelvr
Copy link
Contributor

I never used jupyter notebooks inside a docker container tbh... is there really a need for this?

@keineahnung2345
Copy link
Contributor Author

@miguelvr I agree it's optional. But with it, one can use his own browser to program and don't need to go into the docker and then use vim to do the same thing.

@fmassa
Copy link
Contributor

fmassa commented Nov 23, 2018

I'm ok with merging this, but as I mentioned before I'm not super familiar with Docker so it would be good if someone else could review this.

@miguelvr
Copy link
Contributor

@miguelvr I agree it's optional. But with it, one can use his own browser to program and don't need to go into the docker and then use vim to do the same thing.

you don't have necessarily to go into the docker and use vim... you can mount directories, use solutions like pycharm, etc.

But sure, it is a nice option to have.

I just have one question: why is the password thing necessary?

@keineahnung2345
Copy link
Contributor Author

@miguelvr Because I am using a Linux server(without GUI) from remote, so I can't use IDE like pycharm or spyder. And it should be the easiest way for me.

The password is used by jupyter noetbook. If we don't set a password for jupyter notebook, it will generate a random token when it (automatically) start for safe's sake. And you will need to key in that token when you open :8888 in your browser. But since we let jupyter notebook start automatically inside docker container, it will be hard to find out what the token is. And using password just avoids the need of finding out the token.

@miguelvr
Copy link
Contributor

miguelvr commented Nov 23, 2018

@miguelvr Because I am using a Linux server(without GUI) from remote, so I can't use IDE like pycharm or spyder. And it should be the easiest way for me.

I am too, and yes it is possible :)

The password is used by jupyter noetbook. If we don't set a password for jupyter notebook, it will generate a random token when it (automatically) start for safe's sake. And you will need to key in that token when you open :8888 in your browser. But since we let jupyter notebook start automatically inside docker container, it will be hard to find out what the token is. And using password just avoids the need of finding out the token.

Cool, got it! LGTM

@fmassa
Copy link
Contributor

fmassa commented Nov 23, 2018

@miguelvr can approve the PR once you are good with it? I'll merge once you approve

add description of the password
add -v flag
Copy link
Member

@soumith soumith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there’s nothing special about the jupyter notebook config to warrant bringing the tensorflow copyright. just rewrite the few lines, they are trivial

@keineahnung2345
Copy link
Contributor Author

@fmassa Could you please merge this PR now?

@fmassa fmassa merged commit bcb3212 into facebookresearch:master Nov 27, 2018
@fmassa
Copy link
Contributor

fmassa commented Nov 27, 2018

Thanks!

nprasad2021 pushed a commit to nprasad2021/maskrcnn-benchmark that referenced this pull request Jan 29, 2019
* Dockerfile with jupyter notebook support

* add instruction of building docker with jupyter

* upload dockerfile with jupyter support

* remove Dockerfile-jupyter

* remove jupyter_notebook_config.py

* update INSTALL.md

* Dockerfile with jupyter notebook support

* add instruction of building docker with jupyter

* upload dockerfile with jupyter support

* remove Dockerfile-jupyter

* remove jupyter_notebook_config.py

* update INSTALL.md

* apply changes in 1123

* update INSTALL.md

* update install.md

add description of the password
add -v flag

* clean up

* remove tensorflow copyright
@keineahnung2345 keineahnung2345 deleted the jupyter-docker branch April 30, 2020 13:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants