Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
OpenFold
Commits
a5f7ec8e
Commit
a5f7ec8e
authored
Aug 03, 2022
by
Gustaf Ahdritz
Browse files
Attempt to fix Dockerfile kernel compilation
parent
a6c78775
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
scripts/utils.py
scripts/utils.py
+3
-3
No files found.
scripts/utils.py
View file @
a5f7ec8e
...
@@ -59,7 +59,7 @@ def get_nvidia_cc():
...
@@ -59,7 +59,7 @@ def get_nvidia_cc():
'libcuda.so'
,
'libcuda.so'
,
'libcuda.dylib'
,
'libcuda.dylib'
,
'cuda.dll'
,
'cuda.dll'
,
'/usr/local/cuda/compat/libcuda.so'
,
'/usr/local/cuda/compat/libcuda.so'
,
# For Docker
]
]
for
libname
in
libnames
:
for
libname
in
libnames
:
try
:
try
:
...
@@ -69,8 +69,7 @@ def get_nvidia_cc():
...
@@ -69,8 +69,7 @@ def get_nvidia_cc():
else
:
else
:
break
break
else
:
else
:
raise
OSError
(
"Could not load CUDA library"
)
return
None
,
"Could not load any of: "
+
' '
.
join
(
libnames
)
#return None, "Could not load any of: " + ' '.join(libnames)
nGpus
=
ctypes
.
c_int
()
nGpus
=
ctypes
.
c_int
()
cc_major
=
ctypes
.
c_int
()
cc_major
=
ctypes
.
c_int
()
...
@@ -83,6 +82,7 @@ def get_nvidia_cc():
...
@@ -83,6 +82,7 @@ def get_nvidia_cc():
result
=
cuda
.
cuInit
(
0
)
result
=
cuda
.
cuInit
(
0
)
if
result
!=
CUDA_SUCCESS
:
if
result
!=
CUDA_SUCCESS
:
err
=
cuda
.
cuGetErrorString
(
result
,
ctypes
.
byref
(
error_str
))
err
=
cuda
.
cuGetErrorString
(
result
,
ctypes
.
byref
(
error_str
))
print
(
err
.
value
.
decode
())
return
None
,
err
.
value
.
decode
()
return
None
,
err
.
value
.
decode
()
result
=
cuda
.
cuDeviceGetCount
(
ctypes
.
byref
(
nGpus
))
result
=
cuda
.
cuDeviceGetCount
(
ctypes
.
byref
(
nGpus
))
if
result
!=
CUDA_SUCCESS
:
if
result
!=
CUDA_SUCCESS
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment