Closed anguyen216 closed 3 years ago
So I figured out a solution for this. At the time of writing this, Google Colab default CUDA version is 10.1 and python is 3.7; I downgrade the tensorflow on Colab to 1.15.2 so it's more compatible with CUDA 10.1 and the code written in this repo using the code below
%tensorflow_version 1.x
import sys
import tensorflow
print(tensorflow.__version__)
Also need to install gcc/g++ before I can run makefile
!apt-get install -qq gcc-5 g++-5 -y
!ln -s /usr/bin/gcc-5
!ln -s /usr/bin/g++-5
!sudo apt-get update
!sudo apt-get upgrade
The first three lines of the makefile can be edit as below (this is the path/directory on Google Colab; not sure if you can manually change this or that if you want to/should do that)
nvcc = /usr/local/cuda/bin/nvcc
cudalib = /usr/local/cuda/lib64
tensorflow = /usr/local/lib/python3.6/dist-packages/tensorflow/include
then after mounting the Google Drive and change directory to makefile and cpp files location, I run make as below
%cd /content/drive/My\ Drive/path/to/makefile/
!make
and voila, it worked like a charm. Leave this here in case someone interested in doing the same thing as I'm doing right now in the future and got stuck :)
Hi,
Has anyone try to run this code on Google Colab? I'm choosing Google Colab to avoid having to install all the requirement on my local machine and to take advantage of the GPU on Google Colab.
I'm trying to make the environment as close to the one in which this code has been tested on. So far, Colab let me install CUDA 8.0.61, tensorflow 1.15.2. I'm using gcc 4.8 to compile the makefile. Python, however, is version 3.6 because that's the only thing Google Colab will support. When I tried to compile the makefile for the EMD/Chamfer losses, I get this error message. If anyone know how to work around this, I'd really appreciate it, otherwise, I'll probably have to install all the requirement on my local machine
Here's what in my makefile right now