Dockerfile 1.82 KB
Newer Older
liuzhe-lz's avatar
liuzhe-lz committed
1
2
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
SparkSnail's avatar
SparkSnail committed
3

4
FROM nvidia/cuda:10.2-cudnn8-runtime-ubuntu18.04
5

liuzhe-lz's avatar
liuzhe-lz committed
6
7
ARG NNI_RELEASE

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

10
11
ENV DEBIAN_FRONTEND=noninteractive 

liuzhe-lz's avatar
liuzhe-lz committed
12
13
14
RUN apt-get -y update
RUN apt-get -y install \
    sudo \
SparkSnail's avatar
SparkSnail committed
15
16
17
18
19
20
    apt-utils \
    git \
    curl \
    vim \
    unzip \
    wget \
21
    build-essential \
SparkSnail's avatar
SparkSnail committed
22
23
24
25
26
27
    cmake \
    libopenblas-dev \
    automake \
    openssh-client \
    openssh-server \
    lsof \
28
    python3.6 \
SparkSnail's avatar
SparkSnail committed
29
30
31
    python3-dev \
    python3-pip \
    python3-tk \
liuzhe-lz's avatar
liuzhe-lz committed
32
33
34
    libcupti-dev
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/*
SparkSnail's avatar
SparkSnail committed
35

SparkSnail's avatar
SparkSnail committed
36
37
38
#
# generate python script
#
liuzhe-lz's avatar
liuzhe-lz committed
39
RUN ln -s python3 /usr/bin/python
SparkSnail's avatar
SparkSnail committed
40

Lee's avatar
Lee committed
41
42
43
#
# update pip
#
liuzhe-lz's avatar
liuzhe-lz committed
44
RUN python3 -m pip install --upgrade pip==20.2.4 setuptools==50.3.2
Lee's avatar
Lee committed
45

Yuge Zhang's avatar
Yuge Zhang committed
46
47
# numpy 1.19.5  scipy 1.5.4
RUN python3 -m pip --no-cache-dir install numpy==1.19.5 scipy==1.5.4
SparkSnail's avatar
SparkSnail committed
48

49
#
liuzhe-lz's avatar
liuzhe-lz committed
50
# TensorFlow
51
#
liuzhe-lz's avatar
liuzhe-lz committed
52
RUN python3 -m pip --no-cache-dir install tensorflow==2.3.1
53
54

#
55
# Keras
56
#
Yuge Zhang's avatar
Yuge Zhang committed
57
RUN python3 -m pip --no-cache-dir install Keras==2.4.3
fishyds's avatar
fishyds committed
58

59
#
60
# PyTorch
61
#
62
RUN python3 -m pip --no-cache-dir install torch==1.7.1 torchvision==0.8.2 pytorch-lightning==1.3.3
63
64

#
65
# sklearn 0.24.1
66
#
67
RUN python3 -m pip --no-cache-dir install scikit-learn==0.24.1
SparkSnail's avatar
SparkSnail committed
68

69
#
Lee's avatar
Lee committed
70
71
# pandas==0.23.4 lightgbm==2.2.2
#
72
RUN python3 -m pip --no-cache-dir install pandas==1.1 lightgbm==2.2.2
Lee's avatar
Lee committed
73
74
75

#
# Install NNI
76
#
liuzhe-lz's avatar
liuzhe-lz committed
77
78
COPY dist/nni-${NNI_RELEASE}-py3-none-manylinux1_x86_64.whl .
RUN python3 -m pip install nni-${NNI_RELEASE}-py3-none-manylinux1_x86_64.whl
79

J-shang's avatar
J-shang committed
80
81
82
# 
# Vision patch. Need del later
# 
J-shang's avatar
J-shang committed
83
84
COPY test/vso_tools/interim_patch.py .
RUN python3 interim_patch.py
J-shang's avatar
J-shang committed
85

SparkSnail's avatar
SparkSnail committed
86
87
88
89
90
91
#
# install aml package
#
RUN python3 -m pip --no-cache-dir install azureml
RUN python3 -m pip --no-cache-dir install azureml-sdk

chicm-ms's avatar
chicm-ms committed
92
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
SparkSnail's avatar
SparkSnail committed
93

gongwuji's avatar
gongwuji committed
94
WORKDIR /root