You can finally simulate as much as you wish you could, not just as much as you can.
One of Inductiva's standout features is its ability to seamlessly run any Docker container directly in the cloud. In this guide, we’ll walk you through the integration process using FFMPEG as an example. This approach can also be applied to your own custom Docker images.
By the end of this guide, you’ll know how to:
Let's dive in!
You can use any Docker image from Docker Hub or your own private registry. For this guide, we will use a pre-built FFMPEG image, a widely-used tool for media processing. To get started, run the following command:
docker pull linuxserver/ffmpeg --platform linux/amd64
Uploading Docker images to Inductiva is simple — just one command. When you upload your image, it will automatically be converted into the Singularity Image Format (.sif), which is commonly used in high-performance computing for its portability and security.
To upload your image, run:
inductiva containers upload linuxserver/ffmpeg
💡 Tip: Use
inductiva containers listto verify the containers you’ve uploaded.
Once your container is uploaded, you can use it for cloud-based tasks just like any native Inductiva simulator.
Let’s say you want to run a video processing command that reverses and negates the frames of a video while also reversing the audio. Here’s the command:
ffmpeg -i input.mp4 -vf 'reverse, negate' -af areverse output.mp4
Copy and execute the following Python script to run this remotely on the cloud using the Inductiva API:
import inductiva
# Define the machine group
machine_group = inductiva.resources.MachineGroup(
machine_type="c2d-highcpu-8",
spot=True,
)
# Define your simulator using the uploaded container
ffmpeg = inductiva.simulators.CustomImage(
container_image="inductiva://my-containers/ffmpeg.sif"
)
# Run the task
task = ffmpeg.run(
input_dir="input", # folder containing 'input.mp4'
commands=[
"ffmpeg -i input.mp4 -vf 'reverse, negate' -af areverse output.mp4"
],
on=machine_group,
)
# Wait for it to complete and download the result
task.wait()
task.download_outputs()
# Clean up your resources
machine_group.terminate()
Note: Ensure that the
input_dirincludes yourinput.mp4file and the processed video will be saved as output.mp4.
Inductiva streamlines the process of running Docker containers in the cloud, and here’s why it’s the ideal solution::
Whether you’re processing videos, running simulations, or deploying research tools, Inductiva simplifies the process of scaling your Docker workflows to the cloud — without the hassle.