MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / handleModelArchive

Function handleModelArchive

agent/app/service/tensorrt_llm.go:417–430  ·  view source on GitHub ↗
(modelType string, modelDir string)

Source from the content-addressed store, hash-verified

415}
416
417func handleModelArchive(modelType string, modelDir string) error {
418 filePath, err := findModelArchive(modelType)
419 if err != nil {
420 return err
421 }
422 fileOp := files.NewFileOp()
423 if err = fileOp.TarGzExtractPro(filePath, modelDir, ""); err != nil {
424 return err
425 }
426 if err = fileOp.ChmodR(path.Join(modelDir, "fusionxpark_accelerator"), 0755, false); err != nil {
427 return err
428 }
429 return nil
430}
431
432func getCommand(envStr string) string {
433 lines := strings.Split(envStr, "\n")

Callers 1

CreateMethod · 0.85

Calls 3

TarGzExtractProMethod · 0.95
ChmodRMethod · 0.95
findModelArchiveFunction · 0.85

Tested by

no test coverage detected