|
|
@@ -1220,7 +1220,13 @@ func getUserCommand(engineId int, req *modelarts.GenerateTrainJobReq) (string, s |
|
|
|
userImageUrl := "" |
|
|
|
userCommand := "" |
|
|
|
if engineId < 0 { |
|
|
|
userCommand = "/bin/bash /home/work/run_train.sh 's3://" + req.CodeObsPath + "' 'code/" + req.BootFile + "' '/tmp/log/train.log' --'data_url'='s3://" + req.DataUrl + "' --'train_url'='s3://" + req.TrainUrl + "'" |
|
|
|
tmpCodeObsPath := strings.Trim(req.CodeObsPath, "/") |
|
|
|
tmpCodeObsPaths := strings.Split(tmpCodeObsPath, "/") |
|
|
|
lastCodeDir := "code" |
|
|
|
if len(tmpCodeObsPaths) > 0 { |
|
|
|
lastCodeDir = tmpCodeObsPaths[len(tmpCodeObsPaths)-1] |
|
|
|
} |
|
|
|
userCommand = "/bin/bash /home/work/run_train.sh 's3://" + req.CodeObsPath + "' '" + lastCodeDir + "/" + req.BootFile + "' '/tmp/log/train.log' --'data_url'='s3://" + req.DataUrl + "' --'train_url'='s3://" + req.TrainUrl + "'" |
|
|
|
var versionInfos modelarts.VersionInfo |
|
|
|
if err := json.Unmarshal([]byte(setting.EngineVersions), &versionInfos); err != nil { |
|
|
|
log.Info("json parse err." + err.Error()) |
|
|
|