Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def check_docker(self):
if self.docker_enabled:
assert ai2thor.docker.has_docker(), "Docker enabled, but could not find docker binary in path"
assert ai2thor.docker.nvidia_version() is not None,\
"No nvidia driver version found at /proc/driver/nvidia/version - Dockerized THOR is only \
compatible with hosts with Nvidia cards with a driver installed"