Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into 2-light-version-no-gpu
Browse files Browse the repository at this point in the history
  • Loading branch information
Bianco95 committed May 14, 2024
2 parents fecb037 + 76d635d commit 6d19731
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/docker/aux.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ func parseContainerCommandAndReturnArgs(Ctx context.Context, config commonIL.Int
for _, podData := range data {
podUID = string(podData.Pod.UID)
podNamespace = string(podData.Pod.Namespace)

// check if the directory exists, if not create it
dirPath := config.DataRootFolder + podData.Pod.Namespace + "-" + podUID
if _, err := os.Stat(dirPath); os.IsNotExist(err) {
err := os.MkdirAll(dirPath, os.ModePerm)
if err != nil {
log.G(Ctx).Error(err)
} else {
log.G(Ctx).Info("-- Created directory " + dirPath)
}
}

}

if container.Command == nil {
Expand Down

0 comments on commit 6d19731

Please sign in to comment.