Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
one
spconv
Commits
fc5f6372
Commit
fc5f6372
authored
Apr 26, 2020
by
tusimple
Browse files
fix spconv cuda docker build
parent
b31ec769
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
Dockerfile
Dockerfile
+5
-2
setup.py
setup.py
+3
-1
No files found.
Dockerfile
View file @
fc5f6372
FROM
scrin/dev:latest
FROM
scrin/dev:latest
RUN
cd
/root
&&
\
RUN
PROBLEM_FILE
=
/usr/local/lib/python3.8/dist-packages/torch/share/cmake/Caffe2/Caffe2Targets.cmake
&&
\
sed
-i
's/-Wall;-Wextra;-Wno-unused-parameter;-Wno-missing-field-initializers;-Wno-write-strings;-Wno-unknown-pragmas;-Wno-missing-braces;-fopenmp//g'
$PROBLEM_FILE
&&
\
sed
-i
's/-Wall;-Wextra;-Wno-unused-parameter;-Wno-missing-field-initializers;-Wno-write-strings;-Wno-unknown-pragmas;-Wno-missing-braces//g'
$PROBLEM_FILE
&&
\
cd
/root
&&
\
git clone
--depth
1
--recursive
https://www.github.com/traveller59/spconv.git
&&
\
git clone
--depth
1
--recursive
https://www.github.com/traveller59/spconv.git
&&
\
cd
./spconv
&&
\
cd
./spconv
&&
\
python setup.py
install
SPCONV_FORCE_BUILD_CUDA
=
1
python setup.py
install
setup.py
View file @
fc5f6372
...
@@ -15,6 +15,8 @@ from pathlib import Path
...
@@ -15,6 +15,8 @@ from pathlib import Path
LIBTORCH_ROOT
=
str
(
Path
(
torch
.
__file__
).
parent
)
LIBTORCH_ROOT
=
str
(
Path
(
torch
.
__file__
).
parent
)
SPCONV_FORCE_BUILD_CUDA
=
os
.
getenv
(
"SPCONV_FORCE_BUILD_CUDA"
)
PYTHON_VERSION
=
"{}.{}"
.
format
(
sys
.
version_info
.
major
,
sys
.
version_info
.
minor
)
PYTHON_VERSION
=
"{}.{}"
.
format
(
sys
.
version_info
.
major
,
sys
.
version_info
.
minor
)
class
CMakeExtension
(
Extension
):
class
CMakeExtension
(
Extension
):
...
@@ -46,7 +48,7 @@ class CMakeBuild(build_ext):
...
@@ -46,7 +48,7 @@ class CMakeBuild(build_ext):
'-DPYBIND11_PYTHON_VERSION={}'
.
format
(
PYTHON_VERSION
),
'-DPYBIND11_PYTHON_VERSION={}'
.
format
(
PYTHON_VERSION
),
'-DSPCONV_BuildTests=OFF'
,
'-DSPCONV_BuildTests=OFF'
,
]
# -arch=sm_61
]
# -arch=sm_61
if
not
torch
.
cuda
.
is_available
():
if
not
torch
.
cuda
.
is_available
()
and
SPCONV_FORCE_BUILD_CUDA
is
None
:
cmake_args
+=
[
'-DSPCONV_BuildCUDA=OFF'
]
cmake_args
+=
[
'-DSPCONV_BuildCUDA=OFF'
]
else
:
else
:
cuda_flags
=
[
"
\"
--expt-relaxed-constexpr
\"
"
]
cuda_flags
=
[
"
\"
--expt-relaxed-constexpr
\"
"
]
...
...
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