Languege: python 3.10
I want to run selenium on render.
I tried installing chrome with docker, but an error occurred.
options = Options()
self.driver = webdriver.Chrome(options=options) ← error
unknown error: Chrome failed to start: crashed.
(unknown error: DevTools ActivePort file doesn’t exist)
Is it possible to run selenium in render?
If possible, I would appreciate it if you could provide a simple example.
November 25, 2022, 5:15pm
Thanks for reaching out.
If you’re running in Docker, you’re in control of the environment. A quick Google for the error you shared, “DevTools ActivePort file doesn’t exist”, brings up a
StackOverflow post. There are some suggested solutions in there, seems it could be related to trying to run Chrome as
Alternatively, it might be possible to install Chrome on a
Native Environment with a build script which includes something like this https://gist.github.com/BigAlRender/41f4c4d87df3e25770e3db8db728443e
Hope that helps
Thank you for your reply.
I’ve tried many things, but haven’t found a solution yet.
I am currently trying to do something and would like to know if the following docker-compose.yml can be converted to render.yaml.
Can this be converted?
December 6, 2022, 1:05pm
It would be very helpful if you would share the things you’ve tried and the issues that were raised to see where to offer assistance.
However, it feels like it should be as simple as put the image in a Dockerfile:
# Dockerfile.seleniumFROM selenium/standalone-chrome-debug:latest
Specify that Dockerfile from a Blueprint (creating it as a Private Service)
# render.yamlservices: type: pserv name: selenium-standalone-chrome-debug env: docker dockerfilePath: ./Dockerfile.selenium
I am trying to check with the below configuration.
It worked success in my local environment.
ENV PYTHONIOENCODING utf-8
RUN pip install --upgrade pip
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
CMD [ "python", "./app.py" ]
options = Options()
self.driver = webdriver.Remote(
I’m thinking of migrating this configuration to Render.
I am thinking of converting to render.yaml because docker-compose.yml is not available.
Any method other than converting to render.yaml is fine.
December 7, 2022, 9:47am
I provided an example of how you could use a Render Blueprint to deploy the selenium image you shared previously, if you want to expand that to include your Python Dockerfile the process would be much the same. The full
Blueprint spec is available in the docs
If you run across any issues, feel free to raise them here or open a ticket, but we wouldn’t write your full render.yaml for you.
January 5, 2023, 6:42pm
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.