Of course there is no real NVIDIA Optimus on Linux, but I found an article that gives some workaround: https://bbs.deepin.org/forum.php?mod=viewthread&tid=132312. Below are the steps described in the article.
sudo apt-get install bumblebee-nvidia nvidia-driver nvidia-settings
Verify the installation
sudo apt-get install mesa-utils
note: mesa-utils package provides useful tools to show glx information
optrun glxinfo | grep NVIDIA
note: this step checks whether the installation succeeded.
optirun glxgears -info
note: if you see a notice of your graphics card, you are good.
Run games with your nvidia graphics
to run steam games: