Giter Club home page Giter Club logo

Comments (12)

rogelioamancisidor avatar rogelioamancisidor commented on August 19, 2024

After i have stablished the ssh connection with colab, can i see my files in gdrive from the terminal? because I dont manage to see anything

from internet-of-tomohiro.

demotomohiro avatar demotomohiro commented on August 19, 2024

Copy and paste following code to a cell and run.

from google.colab import drive
drive.mount('/gdrive')

Your google drive will be mount on /gdrive and you can see it from the terminal.
You need to be root to access that directory.

I found that code on code snippets "Mounting Google Drive in your VM". That is displayed when I press ctrl+alt+p keys on Google colab.

from internet-of-tomohiro.

rogelioamancisidor avatar rogelioamancisidor commented on August 19, 2024

do you mean run <sudo ls /gdrive> from terminal? I have tried this and use the root password generated after running your script, but the password seems to be wrong. The gdrive is mounted and I can access to it from colab webapage.

from internet-of-tomohiro.

rogelioamancisidor avatar rogelioamancisidor commented on August 19, 2024

I also tried to loggin as <ssh [email protected]> using the root pasword generated but it is not accepted

from internet-of-tomohiro.

demotomohiro avatar demotomohiro commented on August 19, 2024

sudo command in Google colab seems not configured properly.
You can become root user with su command.
Just run su command and copy & paste the root password.

remocolab uses default config of openssh-server.
You cannot login as root using password in default.

from internet-of-tomohiro.

rogelioamancisidor avatar rogelioamancisidor commented on August 19, 2024

Thanks a lot! <su> command works. I have some further questions ...

    1. is it possible to automate the authoken step from ngrok, the token is always the same isnt?
    1. what about the region? assuming I always want to use eu region for example
    1. is it possible to use container images with colab?

from internet-of-tomohiro.

demotomohiro avatar demotomohiro commented on August 19, 2024

is it possible to automate the authoken step from ngrok, the token is always the same isnt?

You can do that by replacing

remocolab.setupSSHD()

to

remocolab._setupSSHDImpl("Your authtoken", "eu")

But I don't think it is a good idea because authtoken seems like something should be secret.
If you forget that there is your authtoken in the notebook and publish it, anyone can use your authtoken.
That why setupSSHD function doesn't take authtoken but ask it everytime.
I don't know whether google colab's vm can get authtoken automatically and securely.

what about the region? assuming I always want to use eu region for example

Pass your region to remocolab.setupSSHD or remocolab.setupVNC like:

remocolab.setupSSHD("eu")

or

remocolab.setupVNC("eu")

is it possible to use container images with colab?

If it means about docker, I tried it on colab before.
But it seems colab is already working on docker and running docker on docker is very hard.
I gave up.

from internet-of-tomohiro.

libinruan avatar libinruan commented on August 19, 2024

Hello, I can successfully see the virtual desktop following your guide. remocolab works like a charm. I got this message below when I tried to install PyCharm in the remote server. Is there any resolution to this issue?

Start Failed: Failed to initialize graphics environment
java.awt.AWTError: Can't connect to X11 window server using ':1.0' as the value of the DISPLAY variable.

from internet-of-tomohiro.

libinruan avatar libinruan commented on August 19, 2024

I found the solution to my problem stated right above: when making ssh access to the colab server with the regular user account, continue use the regular user account to install Pycharm. Otherwise, the installation won't success.

from internet-of-tomohiro.

libinruan avatar libinruan commented on August 19, 2024

Is it possible to reboot the Colab server and SSH to the same machine later?

In my case, I want to downgrade CUDA from version 10.1 to 10.0 so that I can run a specific version of Tensorflow (2.0.0). A reboot is required but I don't know how to reboot and then SSH back to the same machine.

from internet-of-tomohiro.

demotomohiro avatar demotomohiro commented on August 19, 2024

There is already cuda-10.0 in colab machine without installing it.

~$ /usr/local/cuda-10.0/bin/nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130

It seems colab instance is working on docker or something like docker.
I don't think you cannot reboot the server.
I think installing old cuda requires reboot because that try to install specific version of kernel module.
But as far as I know, you cannot delete or update kernel module used on colab.

from internet-of-tomohiro.

libinruan avatar libinruan commented on August 19, 2024

from internet-of-tomohiro.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.