From 35f662206e1e7181b5ff314ef1c2b325c41dcb6d Mon Sep 17 00:00:00 2001 From: Lasse Espeholt Date: Fri, 31 Jan 2020 12:50:42 +0100 Subject: [PATCH] Fix Google Cloud scripts. PiperOrigin-RevId: 292519178 --- docker/push.sh | 29 +++++++++++++++++++++++++++++ gcp/run.py | 1 + 2 files changed, 30 insertions(+) create mode 100644 docker/push.sh diff --git a/docker/push.sh b/docker/push.sh new file mode 100644 index 0000000..1d1f96d --- /dev/null +++ b/docker/push.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# Copyright 2019 The SEED Authors +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# Pushes docker image seed_rl:$LABEL to the URI $IMAGE_URI:$LABEL. + +set -e +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd $DIR +if test -z "$1" +then + LABEL=$CONFIG +else + LABEL=$1 +fi + +docker tag seed_rl:$LABEL $IMAGE_URI:$LABEL +docker push $IMAGE_URI:$LABEL diff --git a/gcp/run.py b/gcp/run.py index 0a0b62b..50bfe7b 100644 --- a/gcp/run.py +++ b/gcp/run.py @@ -73,6 +73,7 @@ def main(_): logging.info(tf_config) config = json.loads(tf_config) job_type = config.get('task', {}).get('type') + os.environ.update({'PYTHONPATH': '/'}) executor = concurrent.futures.ThreadPoolExecutor( max_workers=FLAGS.actors_per_worker) futures = []