forked from bytedance/byteps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.server.rdma
89 lines (73 loc) · 2.67 KB
/
Dockerfile.server.rdma
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Copyright 2019 Bytedance Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =============================================================================
FROM ubuntu:18.04
ARG REGION
RUN rm -f /tmp/pip.conf &&\
echo -e '[global]\nindex-url = https://pypi.douban.com/simple' >> /tmp/pip.conf
RUN if [ "x$REGION" = "xchina" ]; then mkdir -p ~/.pip && mv /tmp/pip.conf ~/.pip/; fi
ENV LD_LIBRARY_PATH /root/incubator-mxnet/lib/:/usr/local/lib:$LD_LIBRARY_PATH
# To enable RDMA, add `USE_RDMA=1` to `SERVER_BUILD_OPTS` below.
ENV SERVER_BUILD_OPTS "USE_BLAS=openblas USE_MKL=1 USE_DIST_KVSTORE=1 USE_RDMA=1"
ENV BYTEPS_SERVER_MXNET_PATH /root/incubator-mxnet
ENV MXNET_SERVER_LINK https://github.com/bytedance/incubator-mxnet
ENV BYTEPS_BASE_PATH /usr/local
ENV BYTEPS_PATH $BYTEPS_BASE_PATH/byteps
ENV BYTEPS_GIT_LINK https://github.com/bytedance/byteps
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --allow-downgrades --allow-change-held-packages --no-install-recommends \
tzdata \
build-essential \
ca-certificates \
git \
curl \
wget \
vim \
libopenblas-dev \
liblapack-dev \
libopencv-dev \
python \
python-dev \
python-setuptools \
libjemalloc-dev \
graphviz \
cmake \
libjpeg-dev \
libpng-dev \
iftop \
lsb-release \
librdmacm-dev
RUN apt-get update &&\
apt-get -y install python-pip ibverbs-providers &&\
pip install --upgrade pip
RUN pip --no-cache-dir install \
matplotlib \
numpy==1.15.2 \
scipy \
sklearn \
pandas \
graphviz==0.9.0 \
mxboard \
tensorboard==1.0.0a6
WORKDIR /root/
RUN git clone --single-branch --branch byteps --recurse-submodules $MXNET_SERVER_LINK
RUN cd $BYTEPS_SERVER_MXNET_PATH && \
make clean_all && make -j16 $SERVER_BUILD_OPTS
RUN cd $BYTEPS_SERVER_MXNET_PATH && \
cd python && \
python setup.py build && \
python setup.py install &&\
python setup.py bdist_wheel
RUN cd $BYTEPS_BASE_PATH &&\
git clone --recurse-submodules $BYTEPS_GIT_LINK