Skip to content

Commit

Permalink
Fix image preload
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Gu <[email protected]>
  • Loading branch information
tylergu committed Oct 9, 2023
1 parent f52a41b commit 5a500ea
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions acto/post_process/simple_crash_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import os
import queue
import re
import subprocess
import sys
import threading
import time
Expand Down Expand Up @@ -150,6 +151,15 @@ def post_process(self, workdir: str, num_workers: int = 1):
cluster.configure_cluster(self.config.num_nodes, self.config.kubernetes_version)
deploy = Deploy(DeployMethod.YAML, self.config.deploy.file, self.config.deploy.init).new()

# Build an archive to be preloaded
images_archive = os.path.join(workdir, 'images.tar')
if len(self.context['preload_images']) > 0:
# first make sure images are present locally
for image in self.context['preload_images']:
subprocess.run(['docker', 'pull', image])
subprocess.run(['docker', 'image', 'save', '-o', images_archive] +
list(self.context['preload_images']))

################## Operation sequence crash test ######################
workqueue = multiprocessing.Queue()
for trial, steps in self._trial_to_steps.items():
Expand Down

0 comments on commit 5a500ea

Please sign in to comment.