@@ -89,8 +89,7 @@ def _build_aiperf_container(self) -> bool:
8989 # Get repo root using centralized function
9090 repo_root = get_repo_root ()
9191
92- # Build the container
93- build_command = f"cd { repo_root } && docker build -t aiperf:test ."
92+ build_command = f"cd { repo_root } && docker build --target test -t aiperf:test ."
9493
9594 logger .info ("Building AIPerf Docker image..." )
9695 logger .info (f"Build command: { build_command } " )
@@ -143,9 +142,9 @@ def _build_aiperf_container(self) -> bool:
143142 self .aiperf_container_id = container_name
144143 logger .info (f"AIPerf container ready: { container_name } " )
145144
146- # Verify aiperf works by checking the virtual environment
145+ # Verify aiperf works
147146 verify_result = subprocess .run (
148- f"docker exec { container_name } bash -c 'source /opt/ aiperf/venv/bin/activate && aiperf --version' " ,
147+ f"docker exec { container_name } aiperf --version" ,
149148 shell = True ,
150149 capture_output = True ,
151150 text = True ,
@@ -323,12 +322,12 @@ def _test_server(self, server: Server) -> bool:
323322 f"Running AIPerf test { i + 1 } /{ len (server .aiperf_commands )} for { server .name } "
324323 )
325324
326- # Execute aiperf command in the container with verbose output (use the virtual environment)
325+ # Execute aiperf command in the container with verbose output
327326 # Add --ui-type simple to all aiperf commands
328327 aiperf_command_with_ui = aiperf_cmd .command .replace (
329328 "aiperf profile" , f"aiperf profile --ui-type { AIPERF_UI_TYPE } "
330329 )
331- exec_command = f"docker exec { self .aiperf_container_id } bash -c 'source /opt/aiperf/venv/bin/activate && { aiperf_command_with_ui } '"
330+ exec_command = f"docker exec { self .aiperf_container_id } bash -c '{ aiperf_command_with_ui } '"
332331
333332 logger .info (
334333 f"Executing AIPerf command { i + 1 } /{ len (server .aiperf_commands )} against { server .name } :"
0 commit comments