Setup EC2 for Docker with GPU
Follow these steps closely to render videos on EC2 in a Docker container.
These steps are opinionated, but specify a reference that works.
A word of warning: Deviating from the instructions, like:
- choosing a different AMI
- choosing a different Docker base
- choosing something else than EC2
- choosing a different host machine
may lead to the GPU not working. In this case, it is hard to debug.
We recommend to first follow these instructions and make changes once you have a working setup.
Setup EC2 for Docker with GPU
Add keyringbash
Add keyringbash
Install toolkitbash
Install toolkitbash
Add Docker's official GPG keybash
Add Docker's official GPG keybash
Add keyringbash
Add keyringbash
Install Dockerbash
Install Dockerbash
Configure the NVIDIA container runtimebash
Configure the NVIDIA container runtimebash
Dockerfile and entrypoint.sh
. You can for example create them using the nano ./file-to-create command.
Use Ctrl
X to save and quit. 
Dockerfilebash
Dockerfilebash
entrypoint.shbash
entrypoint.shbash
bash
bash
Debugging
Use the npx remotion gpu command to get the output of chrome://gpu to verify that the GPU is working.

