With Serverless AI, you can translate and dub a video into another language. To do so, create a Docker image and run a fine-tuning job based on it. The job converts audio to text, translates the text and creates a dubbed video.Documentation Index
Fetch the complete documentation index at: https://docs.nebius.com/llms.txt
Use this file to discover all available pages before exploring further.
Costs
Nebius AI Cloud charges you for the following billing items:- Compute virtual machines (VMs)
- Boot disks attached to the VMs
- Used space in Standard storage in an Object Storage bucket
Steps
Prepare infrastructure
-
Create a CPU-only VM. The VM is required to build the Docker image based on the VM’s Linux operating system (OS). If you build the image on a non-Linux OS, the image architecture will be incompatible with Serverless AI, and the fine-tuning job will fail.
Configure SSH access to the VM so that you can connect to it later.
- Web console
- CLI
- Terraform
-
In the web console, go to
Compute → Virtual machines.
-
Click
Create virtual machine.
-
On the page that opens, set the following VM configuration:
- Computing resources: Without GPU.
- Platform: Non-GPU AMD EPYC Genoa.
- Preset: 4 CPUs — 16 GiB RAM.
- Boot disk operating system: Ubuntu 24.04 LTS.
- Boot disk size: At least 100 GiB.
- Public IP address:
Auto assign dynamic IP. - Username and SSH key: Configure access credentials.
- Click Create VM.
-
Create a bucket to store fine-tuning artifacts.
- Web console
- CLI
- Terraform
-
In the web console, go to
Storage → Object Storage.
-
Click
Create bucket.
- In the Maximum size field, select Unlimited. Leave the other settings at their default values.
- Click Create bucket.
Prepare files for the Docker image
-
To connect to the VM, get its public IP address:
- Web console
- CLI
- In the web console, go to
Compute → Virtual machines.
- Open the VM page.
- In Network → Public IPv4, copy the address.
-
Connect to the VM by using SSH:
Specify the username that you set when creating the VM.
-
On the VM, create a working directory:
-
In this directory, create the following files for building the Docker image:
To verify that all files are present, run
requirements.txt
process_video.py
app.py
Dockerfile
lsortree. -
Make the
process_video.pyfile executable:
Build and push the Docker image
On the VM:- Install Docker.
-
Install additional packages and prepare Docker for building the image:
-
Check that the Docker daemon is running:
If Docker is running, this command returns a table of containers (can be empty). If you don’t see the table and the daemon isn’t running, launch it.
- Create an account in Docker Hub. Use it for authentication when you push your image to a repository.
- Create a public repository in Docker Hub. You will push your Docker image there.
-
In the
~/video-translation-nebiusdirectory, build the image:In the command, specify your public repository. For example,myrepository/dubbing:video-translation-nebius. This operation can take several minutes to complete. -
Authenticate in Docker Hub:
Specify your username at Docker Hub and enter your password when prompted.
-
Push the image to the repository:
This operation can take several minutes to complete.
Create a dubbed video
-
Create a fine-tuning job that generates a model for translation and that dubs the video:
After the job reaches the
- Web console
- CLI
-
In the web console, go to
AI Services → Jobs.
-
Click
Create job.
-
On the page that opens, specify the following job parameters:
-
Image path:
<repository>/<image>:video-translation-nebius. Set the image that you’ve pushed to the Docker repository. -
Entrypoint command:
The
--urlparameter contains a link to the video being processed. The--target-langparameter specifies what language the audio track is translated into. - Computing resources and Container disk: Keep the predefined settings.
- Mount volumes: Bucket.
-
Mount path:
/mnt/data. After that, clickAttach bucket and then select the bucket created earlier.
-
Image path:
- Click Create.
Completestatus, the following files are created in the bucket:output/transcript.txt: Speech that the model recognized in the video.output/translated.txt: Translation of this speech.output/output_video_with_audio.mp4: Dubbed video.
-
Download the dubbed video:
- Web console
- Open the bucket’s page and go to the
outputdirectory. - In the line of the
output/output_video_with_audio.mp4object, click→ Download.
How to delete the created resources
Some of the created resources are chargeable. If you don’t need them, delete these resources, so Nebius AI Cloud doesn’t charge for them:- CPU-only VM
- Boot disk attached to the VM
- Bucket