stable-baselines3/scripts/run_docker_gpu.sh
San b7c64a1aa4
Simplify GPU detection in docker launch script (#2064)
Co-authored-by: Antonin RAFFIN <antonin.raffin@ensta.org>
2025-01-07 14:58:28 +01:00

12 lines
No EOL
419 B
Bash
Executable file

#!/bin/bash
# Launch an experiment using the docker gpu image
cmd_line="$@"
echo "Executing in the docker (gpu image):"
echo $cmd_line
# Using new-style GPU argument
NVIDIA_ARG="--gpus all"
docker run -it ${NVIDIA_ARG} --rm --network host --ipc=host \
--mount src=$(pwd),target=/home/mamba/stable-baselines3,type=bind stablebaselines/stable-baselines3:latest \
bash -c "cd /home/mamba/stable-baselines3/ && $cmd_line"