Skip to content

Commit

Permalink
removed https:// from s3 location
Browse files Browse the repository at this point in the history
  • Loading branch information
moficodes committed Jan 4, 2020
1 parent 5d4472c commit 8b796e5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cacli/cmd/tensorboard/tensorboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"os"
"os/exec"
"strings"
"syscall"

"github.com/cloud-annotations/training/cacli/cmd/login"
Expand Down Expand Up @@ -38,6 +39,7 @@ func Run(cmd *cobra.Command, args []string) {
modelLocation := model.Entity.TrainingResultsReference.Location.ModelLocation

s3endpoint, err := session.GetEndpointForBucket(bucket)
s3endpoint = strings.ReplaceAll(s3endpoint, "https://", "")

if err != nil {
e.Exit(err)
Expand All @@ -60,8 +62,10 @@ func Run(cmd *cobra.Command, args []string) {
arguments := []string{"tensorboard", fmt.Sprintf("--logdir=s3://%s/%s", bucket, modelLocation)}
env := os.Environ()
env = append(env, fmt.Sprintf("AWS_ACCESS_KEY_ID=%s", session.AccessKeyID))
env = append(env, fmt.Sprintf("AWS_SECRET_ACCESS_KEY_ID=%s", session.SecretAccessKey))
env = append(env, fmt.Sprintf("AWS_SECRET_ACCESS_KEY=%s", session.SecretAccessKey))
env = append(env, fmt.Sprintf("S3_ENDPOINT=%s", s3endpoint))
env = append(env, "S3_USE_HTTPS=1")
env = append(env, "S3_VERIFY_SSL=0")
// command.Env = env

syscall.Exec(binary, arguments, env)
Expand Down

0 comments on commit 8b796e5

Please sign in to comment.