Google Colab Operating System?
Asked Answered
S

4

5

I've created a TensorFlow Model which I then converted to a .mlmodel through coremltools.convert

Loading the .mlmodel back in, I'm trying to make a prediction with the model through Google Colab, but encounter the following error:

Exception: Model prediction is only supported on macOS version 10.13 or later.

Locally, I'm on an M1 MacBook Pro with Big Sur Version 11.4, so I really don't understand how this error is coming to be unless Google Colab uses a different OS?

Solidus answered 19/7, 2021 at 6:55 Comment(1)
Colab runs on Linux, not on Mac OS.Metapsychology
C
10

Google Colab's operating system is the Ubuntu distribution of Linux.

You can figure that out by running:

!cat /etc/*release (or cat /etc/*-release)

When I run that this is what I see:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.6 LTS"
NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.6 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

I figured that out from the Google Colab Tutorial and How to know which Linux Distribution I'm using?

Conde answered 7/1, 2023 at 2:28 Comment(0)
U
2

You can check it by entering this command in a Colab cell:

!uname -a

Linux fcef7afa7bee 5.15.107+ #1 SMP Sat Apr 29 09:15:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Utilize answered 21/6, 2023 at 17:36 Comment(0)
A
0

It is. Colab uses Linux. And has nothing to do with Mac OS.

Autophyte answered 14/7, 2022 at 13:32 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Turanian
B
0

The code that you execute on Google Colab is executed in a virtual machine private to your account. It doesn't use your local machine's hardware or software (except your browser, ofcourse).

Google Colab doesn't use the host OS (macOS, in your case). Instead, it uses a Linux environment. This can be verified by running the following snippet in a code cell.

import os
print(os.name)
# Output: posix

import platform
print(platform.system())
# Output: Linux
Bantustan answered 21/10, 2022 at 5:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.