Skip to content

Instantly share code, notes, and snippets.

@songtianyi
Last active July 13, 2020 11:33
Show Gist options
  • Save songtianyi/d982b00b8a3061b5da041de06cfbb8e5 to your computer and use it in GitHub Desktop.
Save songtianyi/d982b00b8a3061b5da041de06cfbb8e5 to your computer and use it in GitHub Desktop.
(ML with go)mxnet env Dockerfile sharing
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment