in Benchmarks/AMD/FlashAttention.py [0:0]
def create_container(self):
client = docker.from_env()
# Define the Docker run options
docker_run_options = {
'ipc_mode':'host',
'network': 'host',
'name': 'flash_attention',
'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'}},
'tty': True,
'detach': True,
'auto_remove': True
}
# Creates new Docker container
print("Pulling docker container powderluv/vllm_dev_channel:20240927...")
self.container = client.containers.run('powderluv/vllm_dev_channel:20240927', **docker_run_options)
print(f"Created Docker Container ID: {self.container.id}")