docker_build.sh 603 Bytes
Newer Older
pfrl_rainbow's avatar
pfrl_rainbow committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#!/bin/bash

if [ -e environ_secret.sh ]
then
    source utility/environ_secret.sh
else
    source utility/environ.sh
fi

if ! [ -x "$(command -v aicrowd-repo2docker)" ]; then
  echo 'Error: aicrowd-repo2docker is not installed.' >&2
  echo 'Please install it using requirements.txt or pip -U install aicrowd-repo2docker' >&2
  exit 1
fi

# Expected Env variables : in environ.sh

REPO2DOCKER="$(which aicrowd-repo2docker)"

sudo ${REPO2DOCKER} --no-run \
  --user-id 1001 \
  --user-name aicrowd \
  --image-name ${IMAGE_NAME}:${IMAGE_TAG} \
  --debug .

#sudo docker push "${IMAGE_NAME}:${IMAGE_TAG}"