#!/bin/bash

set -euo pipefail

DRIVING_REPO="$(bazel info workspace)"

cp ${DRIVING_REPO}/infra/jupyterhub/docker/requirements3.txt ${DRIVING_REPO}/infra/dask/docker/requirements3.txt
cp ${DRIVING_REPO}/scripts/ansible/roles/python_pip_conf/files/pip.conf ${DRIVING_REPO}/infra/dask/docker/pip.conf

docker build -t docker-registry.zooxlabs.com/epronovost/dask ${DRIVING_REPO}/infra/dask/docker

rm ${DRIVING_REPO}/infra/dask/docker/requirements3.txt
rm ${DRIVING_REPO}/infra/dask/docker/pip.conf
