First you must install Ocaml and a build system for Ocaml (On Ubuntu the package "ocaml-native-compilers" provides ocamlc.opt, but I can't figure out which Ubuntu package provides dune--I use Debian but my VPL server is Ubuntu).
Once you have Ocaml and your build tools installed, you can just edit vpl_run.sh with something like#!/bin/sh
cat > vpl_execution <<EOF
ocamlc.opt main.ml -o main
chmod +x vpl_execution
This is just to get you started. You should do this with a dune file, which you can save in the VPL Activity, I think. You can read the examples for other languages in the VPL source code.