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

Commit

Permalink
Refactor dockerfile (#264)
Browse files Browse the repository at this point in the history
* refactor Dockerfile
  • Loading branch information
SparkSnail authored and yds05 committed Oct 30, 2018
1 parent dc688b8 commit f8b131c
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 87 deletions.
59 changes: 57 additions & 2 deletions deployment/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,60 @@
FROM nni.build.base:cuda9.0-cudnn7-devel-ubuntu16.04
# Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge,
# to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and
# to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

FROM nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04

LABEL maintainer='Microsoft NNI Team<nni@microsoft.com>'

RUN DEBIAN_FRONTEND=noninteractive && \
apt-get -y update && \
apt-get -y install sudo \
apt-utils \
git \
curl \
vim \
unzip \
wget \
build-essential \
cmake \
libopenblas-dev \
automake \
openssh-client \
openssh-server \
lsof \
python3.5 \
python3-dev \
python3-pip \
python3-tk \
libcupti-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# numpy 1.14.3 scipy 1.1.0
RUN pip3 --no-cache-dir install \
numpy==1.14.3 scipy==1.1.0

#
#Install NNI
#
RUN pip3 install -v --user git+https://github.com/Microsoft/nni.git@$(curl --silent "https://api.github.com/repos/Microsoft/nni/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')

#
#Tensorflow 1.10.0
#
Expand All @@ -12,4 +65,6 @@ RUN pip3 --no-cache-dir install tensorflow-gpu==1.10.0
#
RUN pip3 --no-cache-dir install Keras==2.1.6

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

WORKDIR /root
83 changes: 0 additions & 83 deletions deployment/Dockerfile.build.base

This file was deleted.

2 changes: 0 additions & 2 deletions deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ 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.build.base could build the base Docker image, users can get a docker image with Ubuntu and NNI environment after building this file.
Dockerfile could build the customized docker image, users could build their customized docker image using this file.
## 2.Including Libraries

Expand All @@ -17,6 +16,5 @@ NNI v0.1

## 3 How to run

docker build -f Dockerfile.build.base -t nni.build.base:cuda9.0-cudnn7-devel-ubuntu16.04 .
docker build -t nni/nni .
nvidia-docker run -it nni/nni

0 comments on commit f8b131c

Please sign in to comment.