mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
aider: Added a build_docker()
function that builds a docker image called benchmark
from the benchmark/Dockerfile with no other fs context.
# Context: USER: add a build_docker() func that builds a docker image called `benchmark` from the benchmark/Dockerfile with no other fs context
This commit is contained in:
parent
095f47593d
commit
898d98fdb3
1 changed files with 26 additions and 0 deletions
|
@ -393,5 +393,31 @@ def run_unit_tests(testdir, history_fname):
|
|||
return res
|
||||
|
||||
|
||||
def build_docker():
|
||||
command = [
|
||||
"docker",
|
||||
"build",
|
||||
"-t",
|
||||
"benchmark",
|
||||
"benchmark/",
|
||||
]
|
||||
print(" ".join(command))
|
||||
|
||||
try:
|
||||
result = subprocess.run(
|
||||
command,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
text=True,
|
||||
)
|
||||
res = result.stdout
|
||||
print(res)
|
||||
|
||||
except subprocess.CalledProcessError as e:
|
||||
res = f"Failed to build Docker image: {e.output}"
|
||||
|
||||
return res
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue