cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to install Chromium Browser and Chrome Driver on DBX runtime 10.4 and above ?

ranged_coop
Valued Contributor II

Hi Team,

We are wondering if there is a recommended way to install the chromium browser and chrome driver on Databricks Runtime 10.4 and above ?

I have been through the site and have come across several links to this effect, but they all seem to be installing the Chromium Browser from the official Canonical PPA (ppa:canonical-chromium-builds/stage)

FYI - Please use the contents in link at your own risk -

(https://community.databricks.com/s/question/0D53f00001qEWtxCAG/chromedriver-installation-in-databricks)

From my understanding, the DBX runtime 10.4 is based on Ubuntu 20.04 - focal for which builds do not seem to be available in that PPA. Maybe because Ubuntu moved from official deb to installing Chromium as a snap ?

So questions are as follows

  1. Best way to install Chromium Browser in DBX Runtime 10.4 ?
  2. Should we consider the snap package which seems to be available ? (`apt search chromium-browser`) Will it work well with Selenium and the official Chrome Driver ?
  3. Should we consider any other sources for the Chromium Browser such as (`ppa:phd/chromium-browser`) or the google chrome browser directly ? Will they be safe ? Any license issues ?
  4. Does selenium support any other browsers ? Any other chromium based browsers or firefox with geckodriver ?
22 REPLIES 22

User16764241763
Honored Contributor

Hello @Bharath Kumar Ramachandran​ 

You should be able to use the methods defined here

https://linuxize.com/post/how-to-install-chromium-web-browser-on-ubuntu-20-04/

Section: Installing Chromium with apt

Per this documentation

It supports a number of browsers (Google Chrome 12+, Internet Explorer 7,8,9,10, Safari 5.1+, Opera 11.5, Firefox 3+) and operating systems (Windows, Mac, Linux/Unix).

https://www.browserstack.com/guide/selenium-webdriver-tutorial#:~:text=It%20supports%20a%20number%20....

Thank you @Arvind Ravish​ for your response.

As mentioned in my post, Chromium is no longer available as a deb in the ubuntu archives. The link you had shared is a little old.

When I search in the Databricks Terminal, we receive results showing Chromium Browser as snap and not as a deb. Hence the question.

/databricks/driver# apt search chromium-browser
Sorting... Done
Full Text Search... Done
chromium-browser/focal-updates 1:85.0.4183.83-0ubuntu0.20.04.2 amd64
  Transitional package - chromium-browser -> chromium snap
 
chromium-browser-l10n/focal-updates 1:85.0.4183.83-0ubuntu0.20.04.2 all
  Transitional package - chromium-browser-l10n -> chromium snap

Would be really nice if Databricks can provide a recommended way to handle this, since this is a very common use case and there are so many such questions around this topic in our community forums itself...

Also regarding the other browsers, since we are using databricks, requirement is limited to linux and open source browsers only. I hear that not many websites are tested with firefox, hence a little hesitant there...

Thank you...

ranged_coop
Valued Contributor II

Hi @Kaniz Fatma​ , Thank you so much for your response.

I have already been through the link you had shared.

It seems to be installing google-chrome directly from the Google Servers.

But I have been told that google-chrome is proprietary and chromium-browser is open source. Usage of proprietary software in code might cause license issues or some other issues such as telemetry etc. right ? Hence I was looking for some way we could use the open source version i.e. Chromium on which chrome is based on.

Is there a databricks hosted repository available for such use cases or does selenium work with the snap version of chromium-browser ? I hope I am not the only DBX user using DBX runtime 10.4 and trying to use chromium-browser...

Update:

Have tried installing `chromium-browser` and `chromium-chromedriver` through init scripts, but they are not working since the snap processes are not available. Directly trying `snap install chromium` is also not working...

Thank you for all the help.

Prabakar
Databricks Employee
Databricks Employee

Hi @Bharath Kumar Ramachandran​ please refer to askUbuntu here. The Chromium browser is only available as a snap in 19.10 and above. If you don't want to install the Chromium snap package, see How to install Chromium without snap?

ranged_coop
Valued Contributor II

Hi @Prabakar Ammeappin​ ,

Thank you very much for your response.

yes you are correct, Chromium became a snap in 19.10. Databricks runtimes 9.1 and 10.4 both have the Ubuntu version of 20.04.

I am ok with using the snap version of Chromium, but it is not installing properly...

When I try to install using the below command in DBX runtime 10.4 through init script...

apt update

apt install chromium-browser chromium-chromedriver

The following additional packages will be installed:

 apparmor liblzo2-2 snapd squashfs-tools udev

Suggested packages:

 apparmor-profiles-extra apparmor-utils zenity | kdialog

The following NEW packages will be installed:

 apparmor chromium-browser chromium-chromedriver liblzo2-2 snapd

 squashfs-tools udev

0 upgraded, 7 newly installed, 0 to remove and 24 not upgraded.

Need to get 36.3 MB of archives

The init script is completing, but we have log that says as follows.

=> Installing the chromium snap

==> Checking connectivity with the snap store

===> System doesn't have a working snapd, skipping

Also Chromium is not working, when I search for it using which chromium or which chromium-browser, it does not show up.

Is there any other way to get the snap installed and working first before installing ?

ranged_coop
Valued Contributor II

Hi @Prabakar Ammeappin​ ,

I have also gone through the other options of installing Chromium without a snap. But we are finding the options either too complex or not from an official source. I found the following options from the link you had shared. Which option would Databricks recommend ?

  1. Option 01 - Install from Debian Repo
    1. Is it safe to mix packages from Debian and Ubuntu - Messing source lists seems risky ? Even if we pin items, is it safe enough ?
  2. Option 02 - ppa:saiarcot895/chromium-beta - Unofficial PPA - Is it safe ? Can we trust it to remain patched and up to date ?
  3. Option 03 - Google Chrome - Possible License Issues considering that Chrome is not open source ?
  4. Other Options - Flatpak, Nix Installs, Linux Mint Install.

Prabakar
Databricks Employee
Databricks Employee

Hi @Bharath Kumar Ramachandran​ considering the options I would prefer either to go with Option 1 or 4.

Option 2 is unofficial and I won't consider going for it. It's always better to use the official one as we can trust the provider.

Option 3 should be good but as there is a doubt with the licensing then I would not take a risk. If you want to go with this option then do all possible research w.r.t the license part and then go for it.

ranged_coop
Valued Contributor II

Hi @Prabakar Ammeappin​ 

Thank you for your response.

We will try options 01 and 04, however can you please let us know why the snap install is not working. We are using DBX runtime 10.4.

apt update

apt install chromium-browser chromium-chromedriver

snapd is not working as expected.

Please see my response from earlier.

It would be preferable and safe to use the options available in the Ubuntu repos by default instead of bringing in additional repos from outside.

Prabakar
Databricks Employee
Databricks Employee

Hi @Bharath Kumar Ramachandran​ i need to test this and shall get back to you with my findings or a workaround. ​

ranged_coop
Valued Contributor II

Thank you @Prabakar Ammeappin​

Using the Ubuntu sources would be the best case scenario since we can be sure about the authenticity of the source.

ranged_coop
Valued Contributor II

Hi @Prabakar Ammeappin​ ,

Just wanted to check if you got a chance to test the Chromium Snap Install issue ?

Will1
New Contributor III

Chromium can be installed using the Software application and via the command line.

Installing Chromium using Software (GUI)

  1. Click on the Software tool in Fedora.
  2. Search for Chromium Web Browser.
  3. Click on Install.

Regards,

Willjoe

Vidula
Honored Contributor

Hi there @Bharath Kumar Ramachandran​ 

Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help. 

We'd love to hear from you.

Thanks!

ranged_coop
Valued Contributor II

Hi @Vidula Khanna​, We still have not identified a way to install Open Source Chromium Browser in DBX runtime 10.4.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group