Skip to content

Instantly share code, notes, and snippets.

@GD06
Last active May 3, 2017 10:01
Show Gist options
  • Save GD06/0bdb36ba6b76070b7cd7fadfd30fce6b to your computer and use it in GitHub Desktop.
Save GD06/0bdb36ba6b76070b7cd7fadfd30fce6b to your computer and use it in GitHub Desktop.
For running the distributed training on the localhost among different processes
#!/bin/bash -e
CUDA_VISIBLE_DEVICES='' python3 training.py --job_name="ps" --task_index=0 &
sleep 60
CUDA_VISIBLE_DEVICES='0' python3 training.py --job_name="worker" --task_index=0 2> worker_1_log &
CUDA_VISIBLE_DEVICES='1' python3 training.py --job_name="worker" --task_index=1 2> worker_2_log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment