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

adds Dockerfile #78

Merged
merged 5 commits into from
Nov 13, 2018
Merged

adds Dockerfile #78

merged 5 commits into from
Nov 13, 2018

Conversation

miguelvr
Copy link
Contributor

Added Dockerfile to build with CUDA

Example build script with defaults (CUDA_VERSION=9.0, CUDNN_VERSION=7):

nvidia-docker build -t maskrcnn-benchmark docker/ 

Example build script with other CUDA and CUDNN versions:

nvidia-docker build -t --build-arg CUDA_VERSION=9.2 --build-arg CUDNN_VERSION=7 maskrcnn-benchmark docker/ 

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

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

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

Copy link
Contributor

@fmassa fmassa left a comment

Choose a reason for hiding this comment

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

I don't have much experience with Docker, but this looks great to me, thanks a lot!

Could you add a note in the bottom of the INSTALL.md file mentioning the docker installation as well?
Maybe with the details that you added in the comment of the PR?

Thanks a lot!

@miguelvr
Copy link
Contributor Author

Sure thing! You're welcome, thanks for the awesome project!

@robpal1990
Copy link

Sure thing! You're welcome, thanks for the awesome project!

This looks great. Could you add one which does not use conda/miniconda as well?

@miguelvr
Copy link
Contributor Author

Sure thing! You're welcome, thanks for the awesome project!

This looks great. Could you add one which does not use conda/miniconda as well?

why would you want that? It makes no difference because you're in a docker container.

I just used conda because I know it is the preferred method to install pytorch due to the MKL version.

@soumith
Copy link
Member

soumith commented Oct 31, 2018

yea i dont think non-conda based Dockerfile is needed.

@soumith
Copy link
Member

soumith commented Oct 31, 2018

If there's a way for one dockerfile to start from another dockerfile, we should use this as the base Dockerfile https://github.com/pytorch/pytorch/blob/master/docker/pytorch/Dockerfile

@miguelvr
Copy link
Contributor Author

If there's a way for one dockerfile to start from another dockerfile, we should use this as the base Dockerfile https://github.com/pytorch/pytorch/blob/master/docker/pytorch/Dockerfile

You can start a docker from an image, not another dockerfile. If you have an image built and hosted on a dockerhub I would be able to do it. But I am seeing that pytorch's image is for CUDA 9.0 only.

@robpal1990
Copy link

If there's a way for one dockerfile to start from another dockerfile, we should use this as the base Dockerfile https://github.com/pytorch/pytorch/blob/master/docker/pytorch/Dockerfile

You can start a docker from an image, not another dockerfile. If you have an image built and hosted on a dockerhub I would be able to do it. But I am seeing that pytorch's image is for CUDA 9.0 only.

You can always paste the contents of the dockerfile you created at the end of the pytorch dockerfile that Soumith linked here. Not elegant but should work.

@miguelvr
Copy link
Contributor Author

@fmassa please check if those instructions are enough

@fmassa
Copy link
Contributor

fmassa commented Oct 31, 2018

I think this looks good, but I'll let @soumith comment as well because I don't have much experience with Docker.

@fmassa fmassa mentioned this pull request Nov 3, 2018
@mingruimingrui
Copy link

The current Image would be built without NCCL which is needed for fast distributed training.
Might I suggest running
apt-get update && apt-get install -y --no-install-recommends libnccl2=2.3.5-2+cuda9.0
under # install basics>

docker/Dockerfile Outdated Show resolved Hide resolved
INSTALL.md Outdated Show resolved Hide resolved
Copy link
Contributor

@fmassa fmassa left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@fmassa fmassa merged commit 1276d20 into facebookresearch:master Nov 13, 2018
nprasad2021 pushed a commit to nprasad2021/maskrcnn-benchmark that referenced this pull request Jan 29, 2019
* added Dockerfile

* intructions for installation with docker

* adds nccl to dockerfile

* Update Dockerfile

* Update INSTALL.md
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.

6 participants