title: Is it safe to work with confidential data in Colab?
body: <p>After having worked with it for a while, I would like to understand how Colab really works and whereas it is safe to work with confidential data in it. </p>
  
  <p>A bit of context. I understand the differences between Python, IPython and Jupyter Notebook described in <a href="https://plot.ly/python/ipython-vs-python/" rel="noreferrer">here.</a> and I would summarize it by saying Python is a programming language and can be installed as any other application with sudo apt-get). IPython is an interactive command-line terminal for Python and can be installed with pip, the standard package manager for Python. It allows you to install and manage additional packages writen in Python that are not part of the <a href="https://ipython.org/install.html" rel="noreferrer">Python standard library.</a> Jupyter Notebook add a web interface to and it can use several kernels or backends being IPython one of them.</p>
  
  <p>What about Colab? It is my understanding than when using Colab, I get a VM from google with Python pre-installed as well as many other libraries (aka packages) like pandas or matplotlib. These packages are all installed in the base python installation. </p>
  
  <p>Colab VMs comes with some ephemeral storage. This is equivalent to instance storage in <a href="https://medium.com/awesome-cloud/aws-difference-between-ebs-and-instance-store-f030c4407387" rel="noreferrer">AWS.</a> So it will be lost when the VM runtime is interrupted, i.e. our VM is stopped (or would you rather say...terminated?) by Google. I believe that if I were to upload my confidential data there it will not be in my private subnet... </p>
  
  <p><a href="https://en.wikipedia.org/wiki/Mount_(computing)" rel="noreferrer">Mounting</a> our Drive is hence equivalent of using an <a href="https://medium.com/awesome-cloud/aws-difference-between-ebs-and-instance-store-f030c4407387" rel="noreferrer">EBS volume in AWS.</a> An EBS volume is network attached drive so the daat in it will persist even if the VM runtime is interrupted. EBS volumes can however be attached to only one EC2 instance... but I can mount my Drive to several Colab sessions. Not exactly clear to me what these sessions are... 
  Some users would like to create <a href="https://stackoverflow.com/questions/48512569/is-it-possible-to-activate-virtualenv-in-google-colab-bin-sh-1-source-not">virtual environments in Colab</a> and it looks like mounting the drive is a way to get around it. </p>
  
  <p>When mounting our Drive to Colab, we need to authentificate because we are giving to the IP of the Colab VM access to our private subnet. Hence, if we had some confidential data, by using Colab the data would not be leaving our private company subnet...? </p>