Dockerfile gpu changes

pull/1239/head
Piero Toffanin 2021-02-10 14:00:43 -05:00
rodzic 3b2a60737c
commit 1f2d93fd0d
2 zmienionych plików z 7 dodań i 4 usunięć

Wyświetl plik

@ -36,6 +36,9 @@ COPY --from=builder /code /code
# Copy the Python libraries installed via pip from the builder
COPY --from=builder /usr/local /usr/local
# Install OpenCL Drivers
RUN apt install nvidia-opencl-icd-340 intel-opencl-icd
# Install shared libraries that we depend on via APT, but *not*
# the -dev packages to save space!
RUN bash configure.sh installruntimedepsonly \

Wyświetl plik

@ -1,4 +1,3 @@
import os, subprocess
from opendm import log
from repoze.lru import lru_cache
@ -8,8 +7,9 @@ def has_gpus():
try:
platforms = pyopencl.get_platforms()
print(platforms)
exit(1)
for p in platforms:
log.ODM_INFO("Found GPU device: %s" % p.name)
return len(platforms) > 0
except Exception as e:
print(e)
return False