Repo2Docker是BinderHub用于构建容器镜像的工具,同时Repo2Docker还是Jupyter的一个子项目。下面介绍如何在Ubuntu上安装Repo2Docker。
在Ubuntu上安装及基本使用Repo2Docker的步骤:
1.安装Miniconda,将缺省安装python3
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod +x Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh
2.安装repo2docker
pip install jupyter-repo2docker
3.下载一个支持repo2docker的github项目:
git clone https://github.com/openthings/databook
4.然后开始构建
jupyter-repo2docker ./databook
如果是使用root账号(如云服务器中),使用下面的方法:
repo2docker --no-run --user-id 1001 --user-name crowdai --debug ./databook
最后,使用命令 docker images 查看构建的镜像。
项目主页提供的安装方法
1.To install from PyPI, the python packaging index, using pip:
pip install jupyter-repo2docker
2.To install from source:
git clone https://github.com/jupyter/repo2docker.git
cd repo2docker
pip install -e .
相关主题