提交 638d9df1 编写于 作者: M muli

update docker build and install

上级 e1f10d75
FROM ubuntu:16.04
# install python and conda
RUN apt-get update && apt-get install -y python3 git wget bzip2
RUN wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
bash Miniconda3-latest-Linux-x86_64.sh -b
ENV PATH /root/miniconda3/bin:$PATH
RUN git clone https://github.com/mli/gluon-tutorials-zh && \
cd gluon-tutorials-zh && \
conda env create -f environment.yml
# install deps
COPY environment.yml /
RUN conda env create -f environment.yml
# source activate need bash
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# setup notedown
RUN source activate gluon && \
mkdir notebook && \
jupyter notebook --allow-root --generate-config && \
......@@ -20,5 +21,12 @@ RUN source activate gluon && \
EXPOSE 8888
# copy notebooks
RUN mkdir /gluon-tutorials-zh
COPY / /gluon-tutorials-zh/
# sanity check
RUN source activate gluon && notedown --run /gluon-tutorials-zh/chapter01_crashcourse/ndarray.md
CMD source activate gluon && cd /gluon-tutorials-zh && \
jupyter notebook --ip=0.0.0.0 --allow-root
......@@ -38,9 +38,17 @@ jupyter notebook
## 通过docker安装
首先你需要下载并安装[docker](https://docs.docker.com/engine/installation/),然后运行下面命令即可
首先你需要下载并安装[docker](https://docs.docker.com/engine/installation/)。例如Linux下可以
```bash
wget -qO- https://get.docker.com/ | sh
sudo usermod -aG docker
# 然后logout一次
```
然后运行下面命令即可
```bash
docker run -p 8888:8888 muli/gluon-tutorials-zh
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册