(ML with go) 分享一個mxnet環境搭建的dockerfile

songtianyi發表於2016-12-08

可以 docker build 一個 container 上去玩。

FROM daocloud.io/library/ubuntu:wily-20160706

MAINTAINER songtianyi <songtianyi630@163.com>

RUN echo "deb http://mirrors.aliyun.com/ubuntu xenial main restricted universe multiverse\n" > /etc/apt/sources.list

# Pick up some dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
        g++ \
        clang \
        git \
        inetutils-ping \
        telnet \
        build-essential \
        libatlas-base-dev \
        libopencv-dev \
        python-numpy \
        python-setuptools \
        unzip \
        vim \
        golang \
        ca-certificates \
        libopenblas-dev \
        && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Build mxnet
RUN mkdir -p /root/MXNet/
RUN cd /root/MXNet/ && git clone https://github.com/dmlc/mxnet.git
RUN cd /root/MXNet/mxnet && make -j$(nproc)

# Install python language package
RUN cd /root/MXNet/mxnet/python && python setup.py install
RUN echo "export PYTHONPATH=/root/MXNet/mxnet/python" >> /root/.bashrc

# Golang env
RUN echo 'export GOPATH=$HOME/golang/own:$HOME/golang/go' >> /root/.bashrc
RUN echo 'export GOROOT=/usr/lib/go' >> /root/.bashrc

# Play with some code
RUN mkdir -p $GOPATH/src/golang.org/x
RUN cd $GOPATH/src/golang.org/x && git clone https://github.com/golang/image
RUN go get github.com/jdeng/gomxnet
RUN go get github.com/disintegration/imaging
更多原創文章乾貨分享,請關注公眾號
  • (ML with go) 分享一個mxnet環境搭建的dockerfile
  • 加微信實戰群請加微信(註明:實戰群):gocnio

相關文章