Replies: 1 comment
-
Docker can't leverage GPU acceleration (except in very specific cases, using a linux host w/ nvidia GPU and special docker images.. it's a mess). Only chromium supports gpu on linux and it's disabled by default by cypress, so you have to enable the gpu in browser launch flags. Search the cypress issues for GPU and you'll see it's not quite an easy thing to achieve. I'd love to know if you have found any other ways to improve the performance in docker. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm running Cypress with the command:
docker run -it --rm -e "DEBUG=cypress:*" --volume $PWD/code:/e2e --workdir=/e2e --entrypoint=cypress cypress/included:5.5.0 run
The test is very simple but it takes 58 seconds to complete.
The test:
Here is the log https://pastebin.com/0jd7FuBc
Screenshot from the video
cypress.json is {}, so default configuration.
i have tried to run it with
--browser chrome
or--browser firefox
; However, it also takes about 58 seconds. RemovingDEBUG
env or setting recordvideo
tofalse
didn't change anything.The same situation is when I try to use:
docker run -it --rm --shm-size=8g --network host -v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket --privileged -e DISPLAY -e "DEBUG=cypress:*" -v /tmp/.X11-unix:/tmp/.X11-unix -u node --volume $PWD/code:/e2e --workdir=/e2e --entrypoint=cypress cypress/included:5.5.0 open --project . --config baseUrl=http://localhost:4000
If I do not close the window and press
Run all tests
button, then the second run is faster.I was able to shorten time by setting
dns
paramdocker run -it --rm --dns=8.8.8.8 -e "DEBUG=cypress:*" --volume $PWD/code:/e2e --workdir=/e2e --entrypoint=cypress cypress/included:5.5.0 run
On the native browser the page loads under one second. So it's still far from acceptable state.
I didn't find a solution for this problem :(. Anyone encountered such a problem? Is this some kind of bug or regression?
Beta Was this translation helpful? Give feedback.
All reactions