feat: external backend launching log improvements and relative path support (#3348)

* specify workdir when launching external backend for safety / relative paths, bump version, logs

Signed-off-by: Dave Lee <dave@gray101.com>

* sneak in a devcontainer fix

Signed-off-by: Dave Lee <dave@gray101.com>

---------

Signed-off-by: Dave Lee <dave@gray101.com>
This commit is contained in:
Dave 2024-08-23 18:27:14 -04:00 committed by GitHub
parent 61fe2404a0
commit ac5f6f210b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 41 additions and 165 deletions

View file

@ -5,6 +5,7 @@ import (
"fmt"
"os"
"os/signal"
"path/filepath"
"strconv"
"strings"
"syscall"
@ -79,11 +80,17 @@ func (ml *ModelLoader) startProcess(grpcProcess, id string, serverAddress string
log.Debug().Msgf("GRPC Service for %s will be running at: '%s'", id, serverAddress)
workDir, err := filepath.Abs(filepath.Dir(grpcProcess))
if err != nil {
return err
}
grpcControlProcess := process.New(
process.WithTemporaryStateDir(),
process.WithName(grpcProcess),
process.WithName(filepath.Base(grpcProcess)),
process.WithArgs(append(args, []string{"--addr", serverAddress}...)...),
process.WithEnvironment(os.Environ()...),
process.WithWorkDir(workDir),
)
if ml.wd != nil {