kopia lustrzana https://github.com/OpenDroneMap/ODM
Dockerfile gpu changes
rodzic
3b2a60737c
commit
1f2d93fd0d
|
@ -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 \
|
||||
|
|
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue