in Benchmarks/AMD/LLMBenchmark.py [0:0]
def create_container(self):
client = docker.from_env()
# Define the Docker run options
docker_run_options = {
'ipc_mode':'host',
'network': 'host',
'entrypoint':'/bin/bash',
'group_add': ['render'],
'privileged': True,
'security_opt': ['seccomp=unconfined'],
'cap_add': ['CAP_SYS_ADMIN', 'SYS_PTRACE'],
'devices': ['/dev/kfd', '/dev/dri', '/dev/mem'],
'volumes': {str(self.dir_path): {'bind': str(self.dir_path), 'mode': 'rw'}},
'environment': {'HF_HOME': str(self.dir_path)},
'tty': True,
'detach': True
}
# Creates new Docker container
print("Pulling docker container rocm/vllm-dev:20241121-tuned")
self.container = client.containers.run('rocm/vllm-dev:20241121-tuned', **docker_run_options)
print(f"Docker Container ID: {self.container.id}")