I am creating a bash script for automatically pulling the newest container images from Nvidia NGC .
NUM=4
for i in $(seq 0 $NUM); do
yymm=$(date -d "$i months ago" +"%y.%m")
# -- Tensorflow
if [ ! -f "tensorflow/tensorflow_$yymm.sif" ]; then
srun singularity pull tensorflow/tensorflow_$yymm.sif docker://nvcr.io/nvidia/tensorflow:$yymm-tf2-py3 || true
fi
# -- Pytorch
if [ ! -f "pytorch/pytorch_$yymm.sif" ]; then
srun singularity pull pytorch/pytorch_$yymm.sif docker://nvcr.io/nvidia/pytorch:$yymm-py3 || true
fi
done
This works, but what I would like to implement is a solution that checks if the container image actually exists on the remote server before attempting to pull.
A simple ping nvcr.io/nvidia/pytorch:24.06-py3
returns Name or service not known
.
I am attempting to check if a container image exists on a remote server.
New contributor
s_dav is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.