Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading Colab host environment to Ubuntu LTS 20.04 #1880

Closed
drew-parsons opened this issue Feb 26, 2021 · 34 comments
Closed

Upgrading Colab host environment to Ubuntu LTS 20.04 #1880

drew-parsons opened this issue Feb 26, 2021 · 34 comments
Labels

Comments

@drew-parsons
Copy link

Dear Colab team,

the recent system upgrade from python 3.6 to python 3.7 is creating some issues for libraries packaged in PPAs, especially those which have a C++ backend wrapped to python with tools like pybind11, swig or Cython. The issue is that the C++ backend is compiled for python 3.6, and this is not necessarily compatible with python 3.7.

See for instance #1878, #1877, #1873,
https://fenicsproject.discourse.group/t/installing-fenics-from-ppa-on-colab/5148 .

The upgrade came as a surprise to software developers and PPA maintainers, and each development team is currently dealing with it on their own. Unfortunately, it is not possible to ask PPA maintainers to support packaging a special python 3.7 version targeted for Google Colab, because python 3.7 has been explicitly excluded from the list of supported python versions by Ubuntu 18.04 LTS, see https://launchpad.net/ubuntu/+source/python3-defaults/3.6.7-1~18.04 . Software developers will then have to cope by differently packaging such Colab specific versions and releasing them in some other way.

Considering that Ubuntu 18.04 LTS is now almost three years old, what are the plans to upgrade Colab to Ubuntu 20.04 LTS in future? This would probably fix in a very natural way many of the packaging issues introduced by the recent Colab upgrade.

If an upgrade to Ubuntu 20.04 LTS is planned, please keep this ticket open to inform us on the progress.

Thanks,
Drew Parsons @drew-parsons
Francesco Ballarin @francesco-ballarin

@dhyeythumar
Copy link

dhyeythumar commented Feb 26, 2021

Hi @drew-parsons, How to check what changes are made at the kernel level on Colab? Because I used to train reinforcement learning agents & live streaming the process to twitch using X server virtual screen & ffmpeg on Colab. But now the same streaming code has stopped working and, I am not able to figure out why this is happening.

@drew-parsons
Copy link
Author

drew-parsons commented Feb 26, 2021

Hi @dhyeythumar , you can check the Colab python version with

import sys; print(sys.version)

which would match the identity of the python3 command.

!ls -l /usr/bin/python3

On Colab the symlink for this command has been changed from the original python3.6 for Ubuntu 18.04, to /etc/alternatives/python3, which !ls -l /etc/alternatives/python3 shows pointing at /usr/bin/python3.7

You can check the version of the host system with

!lsb_release -a

The linux kernel shouldn't be an issue here, but you can check it with !uname -a.

@colaboratory-team
Copy link
Contributor

colaboratory-team commented Feb 26, 2021

Upgrading to 20.04 had been blocked on upstream availability of some dependencies but should now be unblocked. This issue will track that update (and internally this is b/181338315).
We don't have a timeline to share yet, sorry.

@soonho-tri
Copy link

soonho-tri commented Feb 26, 2021

  • In Ubuntu 20.04 LTS, the python included in the base system is Python 3.8. Does that mean we will have Python3.8 runtime when b/181338315 is resolved?
  • Is there a place (e.g. github / blog / mailing-list / twitter) where breaking changes are announced in advance so that users can prepare?

@craigcitro
Copy link
Contributor

  • In Ubuntu 20.04 LTS, the python included in the base system is Python 3.8. Does that mean we will have Python3.8 runtime when b/181338315 is resolved?

Yes -- at least, that's the plan.

  • Is there a place (e.g. github / blog / mailing-list / twitter) where breaking changes are announced in advance so that users can prepare?

Unfortunately, no.

@drew-parsons
Copy link
Author

Upgrading to 20.04 had been blocked on upstream availability of some dependencies but should now be unblocked. This issue will track that update (and internally this is b/181338315).

Thanks Colab Team. Our users are looking forward to the upgrade.

@vak
Copy link

vak commented May 26, 2021

Today is exactly "3 months later", so, I thought it would be OK to ask:

is there any news/updates on new Google Colab image?

@segatrade
Copy link

Today is exactly "3 months later", so, I thought it would be OK to ask:

is there any news/updates on new Google Colab image?

Not sure, but probably on Dec 26, 2021 drop support for Python 3.7 and update to Ubuntu 20.04 Python 3.8. NEP 29 deprecation policy: https://numpy.org/neps/nep-0029-deprecation_policy.html

@vak
Copy link

vak commented Oct 12, 2021

any update on this issue?

@cperry-goog
Copy link

Thanks, no updates, this is on our radar.

@ogrisel
Copy link

ogrisel commented Oct 15, 2021

For information scikit-learn is also anticipating to stop supporting Python 3.7 in its next major release (Q2 2022) in accordance to NEP 29.

@demining
Copy link

demining commented Oct 26, 2021

Hello everybody! Help me to solve this problem. I try to install the fpylll package on python3 but I get a refusal.

apt install python3-fpylll

Reading package lists ... Done
Building dependency tree
Reading state information ... Done
E: Unable to locate package python3-fpylll

The fact is that Google Colab uses Ubuntu 18.04.5 LTS, but judging by the answer, to fully install package python3-fpylll, me need Ubuntu 21.04
Is it possible to solve this problem in Google Colab itself?

@jasonkhadka
Copy link

Repeating the question again in 2 months but: Any update? Do you know when can we expect this?

Thanks, no updates, this is on our radar.

@ElDavoo
Copy link

ElDavoo commented Feb 18, 2022

actually it is already quite a time for Ubuntu 22.04 ;)

What I would like to have is a variety of different base images, for example when you choose "runtime type" (cpu, gpu, tpu), you can also choose "base image" (18 deprecated, 20, 22 beta)

@EwoutH
Copy link

EwoutH commented Mar 7, 2022

Upgrading to 20.04 had been blocked on upstream availability of some dependencies but should now be unblocked. This issue will track that update (and internally this is b/181338315). We don't have a timeline to share yet, sorry.

@colaboratory-team We are now a full year further, could you provide any update?

@fhk
Copy link

fhk commented Apr 13, 2022

Watch the video

@Danc2050
Copy link

Danc2050 commented May 26, 2022

@colaboratory-team or anyone: I made a notebook that upgrades a Colab VM in about an hour (if you interactively select no to remove packages, don't restart).

It may be a workaround for those that need Ubuntu 20.04 without a restart and who don't mind wasting ~1 hour upgrading their notebook VM each time.

Here are the commands:

!sudo apt update && sudo apt upgrade && sudo apt-get install libcudnn8 libcudnn8-dev libnccl-dev libnccl2 --allow-change-held-packages && sudo apt dist-upgrade
!sudo apt autoremove
!sudo apt install update-manager-core
!sudo ln -sf /usr/bin/python3.6 /usr/bin/python3
!export DEBIAN_FRONTEND=noninteractive # or sudo apt-get install dialog && sudo apt-get install whiptail
!sudo do-release-upgrade -f DistUpgradeViewNonInteractive

@ElDavoo
Copy link

ElDavoo commented May 26, 2022

I made a silent block

update:

!apt install -y iptables > /dev/null 2>&1 
!apt-mark unhold libnccl-dev libnccl2 libcudnn8 > /dev/null
!apt update > /dev/null 2>&1 
!apt -y upgrade > /dev/null 2>&1 
!apt -y full-upgrade > /dev/null 2>&1 
!apt -y autoremove > /dev/null 2>&1
!apt --fix-broken install > /dev/null 2>&1
!apt install ubuntu-release-upgrader-core > /dev/null 2>&1
!apt-mark unhold libnccl-dev libnccl2 libcudnn8 > /dev/null
!apt update > /dev/null 2>&1 
!apt -y upgrade > /dev/null 2>&1 
!apt -y full-upgrade > /dev/null 2>&1 
!apt -y autoremove > /dev/null 2>&1
!apt --fix-broken install > /dev/null 2>&1
!apt install ubuntu-release-upgrader-core > /dev/null 2>&1
!rm /usr/bin/python3
!ln -sf /usr/bin/python3.6 /usr/bin/python3 > /dev/null 2>&1 
!do-release-upgrade -f DistUpgradeViewNonInteractive; > /dev/null 2>&1 
!ln -sf /usr/bin/python3.8 /usr/bin/python3 > /dev/null 2>&1 
!apt install --reinstall -y python3-pip > /dev/null 2>&1 

@chadbrewbaker
Copy link

Bump. I have a C++17 dependency that is horribly broken on the 18 compile chain. This needs to be prioritized.

@EwoutH
Copy link

EwoutH commented Jun 29, 2022

At this point I would suggest going straight to Ubuntu 22.04 LTS (Jammy Jellyfish). That will also directly solve #2165, when using the default Python version of Ubuntu 22.04, which is Python 3.10.

@fhk
Copy link

fhk commented Jul 28, 2022

+1

@RyuuOujiXS
Copy link

Upgrading to 20.04 had been blocked on upstream availability of some dependencies but should now be unblocked. This issue will track that update (and internally this is b/181338315).

Thanks Colab Team. Our users are looking forward to the upgrade.

Thanks for thanking the Colab Team. Your thanks are appreciated.

Today is exactly "3 months later", so, I thought it would be OK to ask:
is there any news/updates on new Google Colab image?

Not sure, but probably on Dec 26, 2021 drop support for Python 3.7 and update to Ubuntu 20.04 Python 3.8. NEP 29 deprecation policy: https://numpy.org/neps/nep-0029-deprecation_policy.html

Thanks for replying to a question your don't have an answer to. Your lack of knowledge has been noted.

I guess this means that Google Colab will never update to Ubuntu 20.04? :(

actually it is already quite a time for Ubuntu 22.04 ;)

...and?

actually it is already quite a time for Ubuntu 22.04 ;)

What I would like to have is a variety of different base images, for example when you choose "runtime type" (cpu, gpu, tpu), you can also choose "base image" (18 deprecated, 20, 22 beta)

Then submit a feature request, kid

At this point I would suggest going straight to Ubuntu 22.04 LTS (Jammy Jellyfish). That will also directly solve #2165, when using the default Python version of Ubuntu 22.04, which is Python 3.10.

Please don't reply to issues you don't understand. If you knew how to fix this, you would have fixed it already. The fact that you're here proves your suggestions are meaningless.

@RyuuOujiXS
Copy link

RyuuOujiXS commented Oct 11, 2022

Also, to all the kids crying: This issue is triaged with no one assigned to it. What more proof do you need to believe that this issue doesn't matter to the devs?

@petrasovaa
Copy link

It looks like it's happening: #3327. I just got Ubuntu 20.04 for my runtime.

@francesco-ballarin
Copy link

@metrizable #3327 closes this

@metrizable
Copy link
Contributor

@drew-parsons Thanks for filing the request. Colab's runtime has been upgraded to Ubuntu 20.04 with plans to upgrade to 22.04 in the future.

@drew-parsons
Copy link
Author

Thanks @metrizable

@drew-parsons
Copy link
Author

drew-parsons commented Mar 9, 2023

Mind you, gotta say, it's still messed up. Ubuntu 20.04 comes with python3.8, but you've overwritten that with python3.9. That means that colab is still incompatible with the python packages built for the system that it's running on. Which sort of defeats the point of the upgrade. It's packages with C extensions built using cython that are affected.

When you do upgrade to 22.04, please don't undermine the system that you're running it on.

@smartibase
Copy link

Now with the upgrade to Ubuntu 20.04, all scripts that have code:

from sage.all import *

you give an error:

!sage-python3 script.py

Traceback (most recent call last):
File "/script.py", line 1, in
from sage.all import *
File "/usr/lib/python3/dist-packages/sage/all.py", line 77, in
from cysignals.signals import (AlarmInterrupt, SignalError,
File "/usr/lib/python3/dist-packages/cysignals/init.py", line 1, in
from .signals import AlarmInterrupt, SignalError, init_cysignals # noqa
ModuleNotFoundError: No module named 'cysignals.signals'sage-python3 script.py

Has anyone been able to resolve this issue?

@demining
Copy link

demining commented Jun 4, 2023

@c0de91101 This obviously should help you "SageMath-in-Google-Colab"

@drew-parsons
Copy link
Author

demining refers to a Russian bitcoin scam. Pulling hacked code from https://cryptodeeptech.ru is not going to help @c0de91101 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests