Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

add PyTorch to Dockerfile #362

Merged
merged 7 commits into from
Nov 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion deployment/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ RUN python3 -m pip install nni
#
RUN python3 -m pip --no-cache-dir install tensorflow-gpu==1.10.0

#
#PyTorch
#
RUN python3 -m pip --no-cache-dir install torch torchvision

#
#Keras 2.1.6
#
Expand All @@ -70,4 +75,4 @@ RUN python3 -m pip --no-cache-dir install scikit-learn

ENV PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/root/.local/bin:/usr/bin:/bin:/sbin

WORKDIR /root
WORKDIR /root
15 changes: 9 additions & 6 deletions deployment/docker/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
Dockerfile
===
## 1.Description
This is the Dockerfile of nni project, including the most kinds of deeplearning frameworks and nni source code. You can run your nni experiment in this docker container directly.
Dockerfile could build the customized docker image, users could build their customized docker image using this file.
This docker file includes the following libraries on `Ubuntu 16.04 LTS`:
This is the Dockerfile of nni project. It includes serveral popular deep learning frameworks and NNI. It is tested on `Ubuntu 16.04 LTS`:

```
CUDA 9.0, CuDNN 7.0
numpy 1.14.3,scipy 1.1.0
TensorFlow 1.5.0
PyTorch (Stable)
Keras 2.1.6
NNI v0.3
```
You can take this Dockerfile as a reference for your own customized Dockerfile.

## 2.How to build and run
__Use the following command to build docker image__
```
__Use the following command from `nni/deployment/docker` to build docker image__
```
docker build -t nni/nni .
```
__Run the docker image__
Expand All @@ -33,4 +33,7 @@ or
```

## 3.Directly retrieve the docker image
If you do not want to build docker image, you can retrieve the NNI docker image from Docker Hub through the command `docker pull msranni/nni:latest`.
Use the following command to retrieve the NNI docker image from Docker Hub
```
docker pull msranni/nni:latest
```