How to setup google-chrome on railway fastApi instance

I am trying to run selenium on my fastApi server and I get the below error. /nix/store/h3bhzvz9ipglcybbcvkxvm4vg9lwvqg4-bash-5.2p26/bin/sh: line 1: google-chrome: command not found My nixpacks.toml looks like the below
[phases.setup]
nixPkgs = ["...", "ffmpeg", "google-chrome","chromium", "chromedriver"]
[phases.setup]
nixPkgs = ["...", "ffmpeg", "google-chrome","chromium", "chromedriver"]
How do I install chrome. Can i ssh into my instance? Any help would be appreciated!
Solution:
I would highly recommend using Browserless, using it means you don't have to install Chrome and all of its needed dependencies into your container or deal with any of the issues involved in that, and this will significantly speed up both the build and the publishing stage. Browserless template here - https://railway.app/template/browserless And here's an example repo that shows you how to use Browserless with selenium - https://github.com/brody192/selenium-example-python...
Jump to solution
13 Replies
Percy
Percy6mo ago
Project ID: N/A
ramuprasad
ramuprasadOP6mo ago
N/A
Solution
Brody
Brody6mo ago
I would highly recommend using Browserless, using it means you don't have to install Chrome and all of its needed dependencies into your container or deal with any of the issues involved in that, and this will significantly speed up both the build and the publishing stage. Browserless template here - https://railway.app/template/browserless And here's an example repo that shows you how to use Browserless with selenium - https://github.com/brody192/selenium-example-python
ramuprasad
ramuprasadOP6mo ago
im not paying 200 dollars a month for a not super scaled use case. I appreciate the help though
Brody
Brody6mo ago
where did 200$ a month come from !?!?
ramuprasad
ramuprasadOP6mo ago
No description
Brody
Brody6mo ago
did you not read my message?? you can self host it on Railway
ramuprasad
ramuprasadOP6mo ago
ahh, i see my bad, will give it a shot
Brody
Brody6mo ago
hey did the template work out for you?
ramuprasad
ramuprasadOP6mo ago
yeah it worked great man, i appreciate it!
Brody
Brody6mo ago
awesome!
Duchess
Duchess2mo ago
New reply sent from Help Station thread:
Hi, I am trying to follow these instructions to use Browserless template. Unfortunately, when I try to create the drive = webdirver.Remote(...), I get an error in poolmanager.py:urllib3.exceptions.LocationValueError: No host specified.Any thoughts? Can share my code/trace if needed.
You're seeing this because this thread has been automatically linked to the Help Station thread.
Duchess
Duchess2mo ago
New reply sent from Help Station thread:
Please see the example repo -https://github.com/brody192/selenium-example-python
You're seeing this because this thread has been automatically linked to the Help Station thread.
GitHub
GitHub - brody192/selenium-example-python
Contribute to brody192/selenium-example-python development by creating an account on GitHub.
Want results from more Discord servers?
Add your server