Repo2Run: Automated Building Executable Environment for Code Repository at Scale

Rui-Da Hu, Chao Peng, Xinchen Wang, Junjielong Xu, Cui-Yun Gao
2/1/2025
59 citations

Official code: bytedance/Repo2Run (197 stars, Python, Apache-2.0, last commit 2025-11-18).

Abstract

Scaling up executable code data is significant for improving language models'software engineering capability. The intricate nature of the process makes it labor-intensive, time-consuming and expert-knowledge-dependent to build a large number of executable code repositories, limiting the scalability of existing work based on running tests.

Show full abstract

The primary bottleneck lies in the automated building of test environments for different repositories, which is an essential yet underexplored task. To mitigate the gap, we introduce Repo2Run, the first LLM-based agent aiming at automating the building of executable test environments for any repositories at scale. Specifically, given a code repository, Repo2Run iteratively builds the Docker image, runs unit tests based on the feedback of the building, and synthesizes the Dockerfile until the entire pipeline is executed successfully. The resulting Dockerfile can then be used to create Docker container environments for running code and tests. We created a benchmark containing 420 Python repositories with unit tests for evaluation. The results illustrate that Repo2Run achieves an 86.0% success rate, outperforming SWE-agent by 77.0%. The resources of Repo2Run are available at https://github.com/bytedance/Repo2Run.

View on arXivView PDF

Code Implementations(1)

bytedance/Repo2RunOfficial100%
Apache-2.0

Repo2Run is an LLM-based agent that automates environment configuration by generating error-free Dockerfiles for Python repositories.

19731Python, DockerfileMar 5, 20251 years agoApache-2.0

Similar Papers

Cite this paper

@article{hu2025reporun,
  title  = {Repo2Run: Automated Building Executable Environment for Code Repository at Scale},
  author = {Rui-Da Hu and Chao Peng and Xinchen Wang and Junjielong Xu and Cui-Yun Gao},
  year   = {2025},
  eprint = {2502.13681},
  archivePrefix = {arXiv},
  doi    = {10.52202/085713-1096},
  url    = {https://doi.org/10.52202/085713-1096},
  journal = {Neural Information Processing Systems}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.13681.svg)](https://codeofpaper.com/paper/2502.13681)

Discussion