File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
# Launch an experiment using the docker gpu image
3
-
4
3
cmd_line=" $@ "
5
-
6
4
echo " Executing in the docker (gpu image):"
7
5
echo $cmd_line
8
6
9
- # TODO: always use new-style once sufficiently widely used (probably 2021 onwards)
10
- if [ -x " $( which nvidia-docker) " ]; then
11
- # old-style nvidia-docker2
12
- NVIDIA_ARG=" --runtime=nvidia"
13
- else
14
- NVIDIA_ARG=" --gpus all"
15
- fi
7
+ # Using new-style GPU argument
8
+ NVIDIA_ARG=" --gpus all"
16
9
17
10
docker run -it ${NVIDIA_ARG} --rm --network host --ipc=host \
18
- --mount src=$( pwd) ,target=/home/mamba/stable-baselines3,type=bind stablebaselines/stable-baselines3:latest \
19
- bash -c " cd /home/mamba/stable-baselines3/ && $cmd_line "
11
+ --mount src=$( pwd) ,target=/home/mamba/stable-baselines3,type=bind stablebaselines/stable-baselines3:latest \
12
+ bash -c " cd /home/mamba/stable-baselines3/ && $cmd_line "
You can’t perform that action at this time.
0 commit comments