Real-time container failure: failed to write to cpu.rt_runtime_us

I am trying to run a docker container in a real-time mode as shown in the Docker documentation: Configure the realtime scheduler. I have enabled CONFIG_RT_GROUP_SCHED in the kernel and I run the following command:

sudo docker run -it --cpu-rt-runtime=950000 --ulimit rtprio=99 --cap-add=sys_nice debian:jessie

But I am getting the following error:

Docker: Error response from daemon: OCI runtime create failed:
container_linux.go:346: starting container process caused
“process_linux.go:297: applying cgroup configuration for process
caused “failed to write 950000 to cpu.rt_runtime_us: write
invalid argument””: unknown.

Am I doing something wrong? Have you managed to run a docker container using real-time scheduler?

(tried on Ubuntu 19.04 (5.0.21) + Docker 19.03.3 and debian 10 Buster (4.19.18) + Docker 19.03.04)