#!/bin/bash

# Setup virtualenv
# create_virtualenv my_new_env
# or
# create_virtualenv my_new_env python2.7
function create_virtualenv() {
  local env_name=$1
  local env_python=${2:-python3.6}
  mkdir -p ~/virtualenv
  pushd ~/virtualenv
  rm -rf $env_name
  virtualenv -p $env_python $env_name
  source $env_name/bin/activate
  pip install --upgrade pip
  popd
}

function install_tf() {
  local version=$1
  if [[ "$version" == "tf-nightly"  ]]
  then
    pip install -q tf-nightly;
  elif [[ "$version" == "tf2"  ]]
  then
    pip install -q "tf-nightly-2.0-preview"
  else
    pip install -q "tensorflow==$version"
  fi
}

#!/bin/bash

# Setup virtualenv
# create_virtualenv my_new_env
# or
# create_virtualenv my_new_env python2.7
function create_virtualenv() {
  local env_name=$1
  local env_python=${2:-python3.6}
  mkdir -p ~/virtualenv
  pushd ~/virtualenv
  rm -rf $env_name
  virtualenv -p $env_python $env_name
  source $env_name/bin/activate
  pip install --upgrade pip
  popd
}

function install_tf() {
  local version=$1
  if [[ "$version" == "tf-nightly"  ]]
  then
    pip install -q tf-nightly;
  elif [[ "$version" == "tf2"  ]]
  then
    pip install -q "tf-nightly"
  else
    pip install -q "tensorflow==$version"
  fi
}

Update TF2 pip install to tf-nightly
Update TF2 pip install to tf-nightly

PiperOrigin-RevId: 276078996
