Last active
January 15, 2024 09:34
-
-
Save harshityadav95/e56c525dcc14eec0d4f64eac67ad5102 to your computer and use it in GitHub Desktop.
Archived : Initialise CUDA environment on Google Colab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!apt-get --purge remove cuda nvidia* libnvidia-* | |
!dpkg -l | grep cuda- | awk '{print $2}' | xargs -n1 dpkg --purge | |
!apt-get remove cuda-* | |
!apt autoremove | |
!apt-get update | |
!wget https://developer.nvidia.com/compute/cuda/9.2/Prod/local_installers/cuda-repo-ubuntu1604-9-2-local_9.2.88-1_amd64 -O cuda-repo-ubuntu1604-9-2-local_9.2.88-1_amd64.deb | |
!dpkg -i cuda-repo-ubuntu1604-9-2-local_9.2.88-1_amd64.deb | |
!apt-key add /var/cuda-repo-9-2-local/7fa2af80.pub | |
!apt-get update | |
!apt-get install cuda-9.2 | |
!pip install git+git://github.com/andreinechaev/nvcc4jupyter.git | |
%load_ext nvcc_plugin |
hello ,
- try !apt-get install cuda gcc-5 g++-5
Hi Harshit,
Is it possible to update this for CUDA 10? This is really awesome btw.Not anytime soon , but will update if i try
- !pip install git+git://github.com/andreinechaev/nvcc4jupyter.git + !pip install git+https://github.com/andreinechaev/nvcc4jupyter.git⏫ use this for install plugin if you are getting error
thank you (y)
i am using this code on google colab 12.2 version to run the CUDA C code but when i run the sample code you provided I get the following error
File "", line 3
global void add(int *a, int *b, int *c) {
^
SyntaxError: invalid syntax
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don't run step 3 and step 4 commands. It worked for me.