常识Jupyter/Docker/Git集成。

gsmo的Python项目详细描述


gsmo公司

常识Jupyter/Docker/Git集成。在

gsmo简化Docker容器中Git存储库的安装和使用。在

创建一个专门构建的Docker image+容器(有关配置选项,请参见^{}),并嵌入Git配置,以便Docker容器内的提交存在于其外部(具有正确的权限、作者信息等)。在

本地笔记本或脚本可以执行non-interactively(结果自动提交给Git),或者启动Jupyter server或{a4}进行交互式工作。在

使用

gsmo run:以非交互方式执行笔记本

gsmo帮助以可复制的方式(在Docker容器内)运行笔记本和脚本,并将更改(尤其是Git提交)传递到主机:

运行中:

gsmo run

在项目目录中:

  • 加载配置(^{}
  • 构建Docker映像
  • 从该图像运行一个容器
  • 在该容器中运行项目的run.ipynb笔记本
  • Git提交结果

交互式

Jupyter服务器

从当前目录构建一个Docker映像,并启动一个安装了当前目录的Jupyter服务器(并设置了各种Git和OS级别的配置,以便更改/提交反映在主机上):

^{pr2}$

Bash shell

Build a Docker image from the current directory, and launch a Bash shell with it mounted (and various Git- and OS-level configs set, so that changes/commits are reflected on the host machine):

^{pr 3}$

Module configuration:

^{}

When you run ^{} in a directory, it will look for a ^{} file in the current directory with any of the following fields and build a corresponding Docker image:

Docker configs

^{} configs

These configs are passed into the Docker container / pertain to the running of a script or notebook inside the container (see non-interactive mode):

  • runstr;默认值:run.ipynb):要运行的笔记本
  • dirstr;默认:当前目录):解析与此目录相关的路径(包括装载)
  • yamlstrList[str]):带有正在运行的模块的配置设置的YAML字符串
  • yaml_pathstrList[str]):带有正在运行的模块的配置设置的YAML文件
  • commitstrList[str];默认值:outconfig dir):运行后Git提交的路径(在非交互模式下)
  • outstr;默认nbs):将执行的笔记本写入的目录

gsmo jupyter配置

Dockerfile

在构建Docker映像时(在上述任何模式下),如果存储库中存在Dockerfile,那么它将被构建并用作基础映像(以及应用于其之上的任何gsmo.yml配置)。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java不可访问配置设计   在java中使用json就像在javascript中一样   java如何屏蔽Android 4.0主密钥   java为什么clickable的预期条件不执行click()?   Azure事件中心:Kafka消费者在java中不轮询任何内容   javajaxb和enum实现接口   java如何在标记下添加ProgressBar和按钮   java如何为对象实现arrayList   使用多重匹配重载java构造方法重载   java使用for循环和if语句搜索帐户   java JPanel在JPanel中添加了顶部填充   IntelliJ将Java项目/模块转换为Maven项目/模块   java如何迭代arraylist中的arraylist   自定义类的java“找不到符号”错误