#!/bin/bash -e # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved [[ -d "dev/packaging" ]] || { echo "Please run this script at detectron2 root!" exit 1 } build_one() { cu=$1 pytorch_ver=$2 case "$cu" in cu*) container_name=manylinux-cuda${cu/cu/} ;; cpu) container_name=manylinux-cuda101 ;; *) echo "Unrecognized cu=$cu" exit 1 ;; esac echo "Launching container $container_name ..." for py in 3.6 3.7 3.8; do docker run -itd \ --name $container_name \ --mount type=bind,source="$(pwd)",target=/detectron2 \ pytorch/$container_name cat <