awsome-distributed-training
awsome-distributed-training copied to clipboard
Sh bad substition error
If you see the following error when building a dockerfile:
sh: 1: Bad substitution
It's likely caused by your dockerfile running sh and not bash which doesn't support variables with v. such as the version of AWS OFI NCCL:
https://github.com/aws-samples/awsome-distributed-training/blob/9fc4e12afdabc29eac4be0d7aa03fa7623295bfc/3.test_cases/1.megatron-lm/0.distributed-training.Dockerfile#L71
The solution is to set the shell in your Dockerfile:
SHELL ["/bin/bash", "-c"]