Spaces:
Build error
Build error
sidharthism
commited on
Commit
•
e2d6896
1
Parent(s):
596562c
Added sudo to openpose
Browse files
app.py
CHANGED
@@ -83,15 +83,15 @@ if not exists(project_name):
|
|
83 |
# see: https://github.com/CMU-Perceptual-Computing-Lab/openpose/issues/949
|
84 |
# install new CMake becaue of CUDA10
|
85 |
os.system(f"wget -q https://cmake.org/files/v3.13/cmake-3.13.0-Linux-x86_64.tar.gz")
|
86 |
-
os.system(f"tar xfz cmake-3.13.0-Linux-x86_64.tar.gz --strip-components=1 -C /usr/local")
|
87 |
# clone openpose
|
88 |
os.system(f"cd {BASE_DIR} && git clone -q --depth 1 https://github.com/CMU-Perceptual-Computing-Lab/openpose.git")
|
89 |
-
os.system("sed -i 's/execute_process(COMMAND git checkout master WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}\/3rdparty\/caffe)/execute_process(COMMAND git checkout f019d0dfe86f49d1140961f8c7dec22130c83154 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}\/3rdparty\/caffe)/g' %s/openpose/CMakeLists.txt" % (BASE_DIR, ))
|
90 |
# install system dependencies
|
91 |
-
os.system("apt-get -qq install -y libatlas-base-dev libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler libgflags-dev libgoogle-glog-dev liblmdb-dev opencl-headers ocl-icd-opencl-dev libviennacl-dev")
|
92 |
# build openpose
|
93 |
print("Building openpose ... May take nearly 15 mins to build ...")
|
94 |
-
os.system(f"cd {BASE_DIR}/openpose && rm -rf {BASE_DIR}/openpose/build || true && mkdir {BASE_DIR}/openpose/build && cd {BASE_DIR}/openpose/build && cmake .. && make -j`nproc`")
|
95 |
print("Openpose successfully build and installed.")
|
96 |
# subprocess.Popen(f"cd {BASE_DIR}/openpose && rm -rf {BASE_DIR}/openpose/build || true && mkdir {BASE_DIR}/openpose/build && cd {BASE_DIR}/openpose/build && cmake .. && make -j`nproc`")
|
97 |
# subprocess.call(["cd", f"{BASE_DIR}/openpose"])
|
|
|
83 |
# see: https://github.com/CMU-Perceptual-Computing-Lab/openpose/issues/949
|
84 |
# install new CMake becaue of CUDA10
|
85 |
os.system(f"wget -q https://cmake.org/files/v3.13/cmake-3.13.0-Linux-x86_64.tar.gz")
|
86 |
+
os.system(f"sudo tar xfz cmake-3.13.0-Linux-x86_64.tar.gz --strip-components=1 -C /usr/local")
|
87 |
# clone openpose
|
88 |
os.system(f"cd {BASE_DIR} && git clone -q --depth 1 https://github.com/CMU-Perceptual-Computing-Lab/openpose.git")
|
89 |
+
os.system("sudo sed -i 's/execute_process(COMMAND git checkout master WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}\/3rdparty\/caffe)/execute_process(COMMAND git checkout f019d0dfe86f49d1140961f8c7dec22130c83154 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}\/3rdparty\/caffe)/g' %s/openpose/CMakeLists.txt" % (BASE_DIR, ))
|
90 |
# install system dependencies
|
91 |
+
os.system("sudo apt-get -qq install -y libatlas-base-dev libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler libgflags-dev libgoogle-glog-dev liblmdb-dev opencl-headers ocl-icd-opencl-dev libviennacl-dev")
|
92 |
# build openpose
|
93 |
print("Building openpose ... May take nearly 15 mins to build ...")
|
94 |
+
os.system(f"sudo cd {BASE_DIR}/openpose && rm -rf {BASE_DIR}/openpose/build || true && mkdir {BASE_DIR}/openpose/build && cd {BASE_DIR}/openpose/build && cmake .. && make -j`nproc`")
|
95 |
print("Openpose successfully build and installed.")
|
96 |
# subprocess.Popen(f"cd {BASE_DIR}/openpose && rm -rf {BASE_DIR}/openpose/build || true && mkdir {BASE_DIR}/openpose/build && cd {BASE_DIR}/openpose/build && cmake .. && make -j`nproc`")
|
97 |
# subprocess.call(["cd", f"{BASE_DIR}/openpose"])
|