mirror of
https://github.com/google-deepmind/alphafold.git
synced 2026-06-04 14:58:05 +08:00
No longer use runtime=nvidia to expose GPUs to the container.
Instead use `DeviceRequest`, which is equivalent to running with `--gpu all`. PiperOrigin-RevId: 431933575 Change-Id: Iee9f70ae8f291d16850e4f58349559d9468ef4d8
This commit is contained in:
committed by
Copybara-Service
parent
552586eba8
commit
5f37a5a2ba
@@ -227,10 +227,14 @@ def main(argv):
|
||||
])
|
||||
|
||||
client = docker.from_env()
|
||||
device_requests = [
|
||||
docker.types.DeviceRequest(driver='nvidia', capabilities=[['gpu']])
|
||||
] if FLAGS.use_gpu else None
|
||||
|
||||
container = client.containers.run(
|
||||
image=FLAGS.docker_image_name,
|
||||
command=command_args,
|
||||
runtime='nvidia' if FLAGS.use_gpu else None,
|
||||
device_requests=device_requests,
|
||||
remove=True,
|
||||
detach=True,
|
||||
mounts=mounts,
|
||||
|
||||
Reference in New Issue
Block a user