Skip to content

Commit

Permalink
setup & docker: update framework and fix compile (#212)
Browse files Browse the repository at this point in the history
* setup: handle cxx flag

* automatically add cuda lib for mxnet

* fix softlink location

* fix os path

* fix ld_library_path

* fix cuda default path

* refactor dockerfilie

* set proper nccl version

* add torchvision

* fix setup and use tf 1.15 for dockerfile

* improve handling of libcuda.so.1
  • Loading branch information
ymjiang authored Mar 3, 2020
1 parent 536dd85 commit 6c3c713
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 377 deletions.
2 changes: 1 addition & 1 deletion 3rdparty/ps-lite
57 changes: 57 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
FROM nvidia/cuda:10.0-devel-ubuntu18.04

ARG https_proxy
ARG http_proxy

ARG BYTEPS_BASE_PATH=/usr/local
ARG BYTEPS_PATH=$BYTEPS_BASE_PATH/byteps
ARG BYTEPS_GIT_LINK=https://github.com/bytedance/byteps
ARG BYTEPS_BRANCH=master

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y --allow-downgrades --allow-change-held-packages --no-install-recommends \
build-essential \
tzdata \
ca-certificates \
git \
curl \
wget \
vim \
cmake \
lsb-release \
libcudnn7=7.6.0.64-1+cuda10.0 \
libnuma-dev \
ibverbs-providers \
librdmacm-dev \
ibverbs-utils \
rdmacm-utils \
libibverbs-dev \
python3 \
python3-dev \
python3-pip \
python3-setuptools \
libnccl2=2.4.7-1+cuda10.0 \
libnccl-dev=2.4.7-1+cuda10.0

# install framework
# note: for tf <= 1.14, you need gcc-4.9
ARG FRAMEWORK=tensorflow
RUN if [ "$FRAMEWORK" = "tensorflow" ]; then \
pip3 install --upgrade pip; \
pip3 install -U tensorflow-gpu==1.15.0; \
elif [ "$FRAMEWORK" = "pytorch" ]; then \
pip3 install -U numpy==1.18.1 torchvision==0.5.0 torch==1.4.0; \
elif [ "$FRAMEWORK" = "mxnet" ]; then \
pip3 install -U mxnet-cu100==1.5.0; \
else \
echo "unknown framework: $FRAMEWORK"; \
exit 1; \
fi

ENV LD_LIBRARY_PATH /usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH

RUN cd $BYTEPS_BASE_PATH &&\
git clone --recursive -b $BYTEPS_BRANCH $BYTEPS_GIT_LINK &&\
cd $BYTEPS_PATH &&\
python3 setup.py install
116 changes: 0 additions & 116 deletions docker/Dockerfile.mxnet

This file was deleted.

120 changes: 0 additions & 120 deletions docker/Dockerfile.pytorch

This file was deleted.

Loading

0 comments on commit 6c3c713

Please sign in to comment.