Docker-compose.yml for Portainer Stack

Edit: I am looking for a docker-compose.yml for a Portainer Stack to be able to add a bind mount to an external drive. Thus, if the container gets updated, the data persists. Thanks a lot!

The command to translate to compose yml for Portainer is:

docker run --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 \
> --runtime nvidia -v ${PWD}/examples:/examples \
> -it simnet:21.06 bash