通过深度学习自动生成Dockerfiles:挑战和承诺
Automatically Generating Dockerfiles via Deep Learning: Challenges and Promises
摘要:
容器化允许开发人员定义需要安装其软件的执行环境。Docker是该领域的领先平台,使用它的开发人员需要为他们的软件编写Dockerfile。编写Dockerfiles绝非易事,特别是当系统对其执行环境有不寻常的要求时。尽管有几种工具可以支持开发人员编写Dockerfiles,但考虑到执行环境要求的高级规范,它们都无法从头开始生成整个Dockerfiles。在本文中,我们提出了一项研究,旨在了解深度学习(DL)在多大程度上可用于此特定的编码任务,该深度学习已被证明在其他编码任务中是成功的。我们初步定义了Dockerfile需求的结构化自然语言规范,以及我们用来从目前可用的最大Dockerfiles数据集中自动推断需求的方法。我们使用所获得的数据集(具有670,982个实例)来训练和测试文本到文本传输Transformer(T5)模型,遵循当前最先进的编码任务程序,从结构化规范自动生成Dockerfiles。我们的评估结果表明,T5的表现类似于我们考虑的更平凡的基于IR的基线。我们还报告了在Dockerfile生成的背景下与深度学习应用相关的开放性挑战。
英文摘要:
Containerization allows developers to define the execution environment in which their software needs to be installed. Docker is the leading platform in this field, and developers that use it are required to write a Dockerfile for their software. Writing Dockerfiles is far from trivial, especially when the system has unusual requirements for its execution environment. Despite several tools exist to support developers in writing Dockerfiles, none of them is able to generate entire Dockerfiles from scratch given a high-level specification of the requirements of the execution environment. In this paper, we present a study in which we aim at understanding to what extent Deep Learning (DL), which has been proven successful for other coding tasks, can be used for this specific coding task. We preliminarily defined a structured natural language specification for Dockerfile requirements and a methodology that we use to automatically infer the requirements from the largest dataset of Dockerfiles currently available. We used the obtained dataset, with 670,982 instances, to train and test a Text-to-Text Transfer Transformer (T5) model, following the current state-of-the-art procedure for coding tasks, to automatically generate Dockerfiles from the structured specifications. The results of our evaluation show that T5 performs similarly to the more trivial IR-based baselines we considered. We also report the open challenges associated with the application of deep learning in the context of Dockerfile generation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。