| @@ -107,7 +107,7 @@ | |||
| <meta property="og:title" content="OpenI"> | |||
| <meta property="og:type" content="website" /> | |||
| <meta property="og:image" content="/img/gitea-lg.png" /> | |||
| <meta property="og:url" content="https://git.openi.org.cn/" /> | |||
| <meta property="og:url" content="https://openi.pcl.ac.cn/" /> | |||
| <meta property="og:description" content="Efficient code management center, you can host and review code"> | |||
| <meta property="og:site_name" content="OpenI" /> | |||
| @@ -250,7 +250,7 @@ var _hmt = _hmt || []; | |||
| <a href=https://git.openi.org.cn/OpenIOSSG/promote/src/branch/master/notice/Other_notes/RegisterMobileNumber.md class="a_width" target="_blank"> | |||
| <a href=https://openi.pcl.ac.cn/OpenIOSSG/promote/src/branch/master/notice/Other_notes/RegisterMobileNumber.md class="a_width" target="_blank"> | |||
| <i class="ri-arrow-right-s-line"></i> | |||
| 7月中下旬登录启智AI协作平台,需登记手机号码啦>>> | |||
| </a> | |||
| @@ -308,7 +308,7 @@ var _hmt = _hmt || []; | |||
| isNewNotice=false; | |||
| } | |||
| let isShowNoticeTag = false; | |||
| let notices= [{"Title":"“我为开源打榜狂”上榜领奖者名单公示1周,10万奖金被瓜分,请大家自行确认\u003e\u003e\u003e","Link":"https://openi.org.cn/html/2022/notices_0701/636.html","Visible":1},{"Title":"7月中下旬登录启智AI协作平台,需登记手机号码啦\u003e\u003e\u003e","Link":"https://git.openi.org.cn/OpenIOSSG/promote/src/branch/master/notice/Other_notes/RegisterMobileNumber.md","Visible":1},{"Title":"智算网络Beta版本上线,大大缩短算力排队时间,速来体验吧~\u003e\u003e\u003e","Link":"https://openi.org.cn/html/2022/dongtai_0628/634.html","Visible":1},{"Title":"启智AI协作平台问卷调查,邀请您参加\u003e\u003e\u003e","Link":"https://wj.qq.com/s2/10362208/5c0c","Visible":1}] | |||
| let notices= [{"Title":"“我为开源打榜狂”上榜领奖者名单公示1周,10万奖金被瓜分,请大家自行确认\u003e\u003e\u003e","Link":"https://openi.org.cn/html/2022/notices_0701/636.html","Visible":1},{"Title":"7月中下旬登录启智AI协作平台,需登记手机号码啦\u003e\u003e\u003e","Link":"https://openi.pcl.ac.cn/OpenIOSSG/promote/src/branch/master/notice/Other_notes/RegisterMobileNumber.md","Visible":1},{"Title":"智算网络Beta版本上线,大大缩短算力排队时间,速来体验吧~\u003e\u003e\u003e","Link":"https://openi.org.cn/html/2022/dongtai_0628/634.html","Visible":1},{"Title":"启智AI协作平台问卷调查,邀请您参加\u003e\u003e\u003e","Link":"https://wj.qq.com/s2/10362208/5c0c","Visible":1}] | |||
| if(notices != null && notices!=''){ | |||
| for (i =0;i<notices.length;i++){ | |||
| if (notices[i].Visible==1){ | |||
| @@ -604,7 +604,7 @@ var _hmt = _hmt || []; | |||
| </div> | |||
| </div> | |||
| <a href="https://git.openi.org.cn/zeizei/OpenI_Learning" class=" item a_margin" target="_blank"><i class="ri-creative-commons-by-line footer_icon" ></i><p class="footer_icon">Tutorial</p> </a> | |||
| <a href="https://openi.pcl.ac.cn/zeizei/OpenI_Learning" class=" item a_margin" target="_blank"><i class="ri-creative-commons-by-line footer_icon" ></i><p class="footer_icon">Tutorial</p> </a> | |||
| <a href="/api/swagger" class=" item a_margin"><i class="ri-exchange-line footer_icon" > </i><p class="footer_icon">API</p> </a> | |||
| <a href="/user/login" class=" item a_margin" ><i class="ri-mail-send-line footer_icon" ></i><p class="footer_icon">Feedback</p></a> | |||
| @@ -2344,6 +2344,61 @@ func CloudbrainAllStatic(opts *CloudbrainsOptions) ([]*CloudbrainInfo, int64, er | |||
| return cloudbrains, count, nil | |||
| } | |||
| func CloudbrainAllKanBan(opts *CloudbrainsOptions) ([]*CloudbrainInfo, int64, error) { | |||
| sess := x.NewSession() | |||
| defer sess.Close() | |||
| var cond = builder.NewCond() | |||
| if (opts.Type) >= 0 { | |||
| cond = cond.And( | |||
| builder.Eq{"cloudbrain.type": opts.Type}, | |||
| ) | |||
| } | |||
| if opts.BeginTimeUnix > 0 && opts.EndTimeUnix > 0 { | |||
| cond = cond.And( | |||
| builder.And(builder.Gte{"cloudbrain.created_unix": opts.BeginTimeUnix}, builder.Lte{"cloudbrain.created_unix": opts.EndTimeUnix}), | |||
| ) | |||
| } | |||
| var count int64 | |||
| var err error | |||
| count, err = sess.Unscoped().Where(cond).Count(new(Cloudbrain)) | |||
| if err != nil { | |||
| return nil, 0, fmt.Errorf("Count: %v", err) | |||
| } | |||
| if opts.Page >= 0 && opts.PageSize > 0 { | |||
| var start int | |||
| if opts.Page == 0 { | |||
| start = 0 | |||
| } else { | |||
| start = (opts.Page - 1) * opts.PageSize | |||
| } | |||
| sess.Limit(opts.PageSize, start) | |||
| } | |||
| // sess.OrderBy("cloudbrain.created_unix DESC") | |||
| cloudbrains := make([]*CloudbrainInfo, 0, setting.UI.IssuePagingNum) | |||
| if err := sess.Cols("id", "type", "work_server_number", "duration", "train_job_duration", "ai_center", "cluster").Table(&Cloudbrain{}).Unscoped().Where(cond). | |||
| Find(&cloudbrains); err != nil { | |||
| return nil, 0, fmt.Errorf("Find: %v", err) | |||
| } | |||
| if opts.NeedRepoInfo { | |||
| var ids []int64 | |||
| for _, task := range cloudbrains { | |||
| ids = append(ids, task.RepoID) | |||
| } | |||
| repositoryMap, err := GetRepositoriesMapByIDs(ids) | |||
| if err == nil { | |||
| for _, task := range cloudbrains { | |||
| task.Repo = repositoryMap[task.RepoID] | |||
| } | |||
| } | |||
| } | |||
| return cloudbrains, count, nil | |||
| } | |||
| func GetStartedCloudbrainTaskByUpdatedUnix(startTime, endTime time.Time) ([]Cloudbrain, error) { | |||
| r := make([]Cloudbrain, 0) | |||
| err := x.Where("updated_unix >= ? and updated_unix <= ? and start_time > 0", startTime.Unix(), endTime.Unix()).Unscoped().Find(&r) | |||
| @@ -46,7 +46,8 @@ type CloudbrainDurationStatistic struct { | |||
| ComputeResource string | |||
| AccCardType string `xorm:"INDEX"` | |||
| DateTime timeutil.TimeStamp `xorm:"INDEX"` | |||
| DateTime timeutil.TimeStamp `xorm:"INDEX DEFAULT 0"` | |||
| DateTimeUnix timeutil.TimeStamp `xorm:"INDEX DEFAULT 0"` | |||
| DayTime string `xorm:"INDEX"` | |||
| HourTime int `xorm:"INDEX"` | |||
| CardsUseDuration int | |||
| @@ -274,7 +275,6 @@ func GetCloudbrainByTime(beginTime int64, endTime int64) ([]*CloudbrainInfo, err | |||
| sess := x.NewSession() | |||
| defer sess.Close() | |||
| var cond = builder.NewCond() | |||
| sess.Exec("if ") | |||
| cond = cond.Or( | |||
| builder.And(builder.Gte{"cloudbrain.end_time": beginTime}, builder.Lte{"cloudbrain.start_time": beginTime}, builder.Gt{"cloudbrain.start_time": 0}), | |||
| ) | |||
| @@ -284,11 +284,12 @@ func GetCloudbrainByTime(beginTime int64, endTime int64) ([]*CloudbrainInfo, err | |||
| cond = cond.Or( | |||
| builder.And(builder.Eq{"cloudbrain.status": string(JobRunning)}), | |||
| ) | |||
| sess.OrderBy("cloudbrain.created_unix ASC") | |||
| sess.OrderBy("cloudbrain.id ASC") | |||
| cloudbrains := make([]*CloudbrainInfo, 0, 10) | |||
| if err := sess.Table(&Cloudbrain{}).Unscoped().Where(cond). | |||
| Find(&cloudbrains); err != nil { | |||
| log.Info("find error.") | |||
| log.Error("find error.") | |||
| return nil, err | |||
| } | |||
| return cloudbrains, nil | |||
| } | |||
| @@ -303,7 +304,8 @@ func GetSpecByAiCenterCodeAndType(aiCenterCode string, accCardType string) ([]*C | |||
| cloudbrainSpecs := make([]*CloudbrainSpec, 0, 10) | |||
| if err := sess.Table(&CloudbrainSpec{}).Where(cond). | |||
| Find(&cloudbrainSpecs); err != nil { | |||
| log.Info("find error.") | |||
| log.Error("find error.") | |||
| return nil, err | |||
| } | |||
| return cloudbrainSpecs, nil | |||
| } | |||
| @@ -328,7 +330,8 @@ func GetCanUseCardInfo() ([]*ResourceQueue, error) { | |||
| sess.OrderBy("resource_queue.cluster DESC, resource_queue.ai_center_code ASC") | |||
| ResourceQueues := make([]*ResourceQueue, 0, 10) | |||
| if err := sess.Table(&ResourceQueue{}).Find(&ResourceQueues); err != nil { | |||
| log.Info("find error.") | |||
| log.Error("find error.") | |||
| return nil, err | |||
| } | |||
| return ResourceQueues, nil | |||
| } | |||
| @@ -339,7 +342,7 @@ func GetCardDurationStatistics(opts *DurationStatisticOptions) ([]*CloudbrainDur | |||
| var cond = builder.NewCond() | |||
| if opts.BeginTime.Unix() > 0 && opts.EndTime.Unix() > 0 { | |||
| cond = cond.And( | |||
| builder.And(builder.Gte{"cloudbrain_duration_statistic.date_time": opts.BeginTime.Unix()}, builder.Lt{"cloudbrain_duration_statistic.date_time": opts.EndTime.Unix()}), | |||
| builder.And(builder.Gte{"cloudbrain_duration_statistic.date_time_unix": opts.BeginTime.Unix()}, builder.Lt{"cloudbrain_duration_statistic.date_time_unix": opts.EndTime.Unix()}), | |||
| ) | |||
| } | |||
| if opts.AiCenterCode != "" { | |||
| @@ -350,7 +353,8 @@ func GetCardDurationStatistics(opts *DurationStatisticOptions) ([]*CloudbrainDur | |||
| CloudbrainDurationStatistics := make([]*CloudbrainDurationStatistic, 0, 10) | |||
| if err := sess.Table(&CloudbrainDurationStatistic{}).Where(cond). | |||
| Find(&CloudbrainDurationStatistics); err != nil { | |||
| log.Info("find error.") | |||
| log.Error("find error.") | |||
| return nil, err | |||
| } | |||
| return CloudbrainDurationStatistics, nil | |||
| } | |||
| @@ -358,10 +362,18 @@ func GetCardDurationStatistics(opts *DurationStatisticOptions) ([]*CloudbrainDur | |||
| func GetDurationRecordBeginTime() ([]*CloudbrainDurationStatistic, error) { | |||
| sess := xStatistic.NewSession() | |||
| defer sess.Close() | |||
| sess.OrderBy("cloudbrain_duration_statistic.date_time ASC limit 1") | |||
| var cond = builder.NewCond() | |||
| cond = cond.And( | |||
| builder.Gt{"cloudbrain_duration_statistic.date_time_unix": 0}, | |||
| ) | |||
| sess.OrderBy("cloudbrain_duration_statistic.date_time_unix ASC limit 1") | |||
| CloudbrainDurationStatistics := make([]*CloudbrainDurationStatistic, 0) | |||
| if err := sess.Table(&CloudbrainDurationStatistic{}).Find(&CloudbrainDurationStatistics); err != nil { | |||
| log.Info("find error.") | |||
| if err := sess.Table(&CloudbrainDurationStatistic{}).Where(cond).Find(&CloudbrainDurationStatistics); err != nil { | |||
| log.Error("find error.") | |||
| return nil, err | |||
| } | |||
| return CloudbrainDurationStatistics, nil | |||
| } | |||
| @@ -369,10 +381,16 @@ func GetDurationRecordBeginTime() ([]*CloudbrainDurationStatistic, error) { | |||
| func GetDurationRecordUpdateTime() ([]*CloudbrainDurationStatistic, error) { | |||
| sess := xStatistic.NewSession() | |||
| defer sess.Close() | |||
| sess.OrderBy("cloudbrain_duration_statistic.date_time DESC limit 1") | |||
| var cond = builder.NewCond() | |||
| cond = cond.And( | |||
| builder.Gt{"cloudbrain_duration_statistic.date_time_unix": 1577808000}, | |||
| ) | |||
| sess.OrderBy("cloudbrain_duration_statistic.date_time_unix DESC limit 1") | |||
| CloudbrainDurationStatistics := make([]*CloudbrainDurationStatistic, 0) | |||
| if err := sess.Table(&CloudbrainDurationStatistic{}).Find(&CloudbrainDurationStatistics); err != nil { | |||
| log.Info("find error.") | |||
| if err := sess.Table(&CloudbrainDurationStatistic{}).Where(cond).Find(&CloudbrainDurationStatistics); err != nil { | |||
| log.Error("find error.") | |||
| return nil, err | |||
| } | |||
| return CloudbrainDurationStatistics, nil | |||
| } | |||
| @@ -380,8 +398,8 @@ func GetDurationRecordUpdateTime() ([]*CloudbrainDurationStatistic, error) { | |||
| func DeleteCloudbrainDurationStatistic(beginTime timeutil.TimeStamp, endTime timeutil.TimeStamp) error { | |||
| sess := xStatistic.NewSession() | |||
| defer sess.Close() | |||
| if _, err := sess.Exec("DELETE FROM cloudbrain_duration_statistic WHERE cloudbrain_duration_statistic.date_time BETWEEN ? AND ?", beginTime, endTime); err != nil { | |||
| log.Info("DELETE cloudbrain_duration_statistic data error.") | |||
| if _, err := sess.Exec("DELETE FROM cloudbrain_duration_statistic WHERE cloudbrain_duration_statistic.date_time_unix BETWEEN ? AND ?", beginTime, endTime); err != nil { | |||
| log.Error("DELETE cloudbrain_duration_statistic data error.") | |||
| return err | |||
| } | |||
| return nil | |||
| @@ -661,6 +661,9 @@ func GetCloudBrainByIdOrJobId(id string) (*models.Cloudbrain,error) { | |||
| job, err = models.GetCloudbrainByJobID(id) | |||
| } else { | |||
| job, err = models.GetCloudbrainByID(id) | |||
| if err!=nil{ | |||
| job, err = models.GetCloudbrainByJobID(id) | |||
| } | |||
| } | |||
| return job,err | |||
| @@ -37,7 +37,7 @@ var ( | |||
| SpecialPools *models.SpecialPools | |||
| CommandPrepareScriptGpu = ";mkdir -p output;mkdir -p code;mkdir -p dataset;mkdir -p pretrainmodel;echo \"start loading script\";wget -q https://git.openi.org.cn/OpenIOSSG/%s/archive/master.zip;" + | |||
| CommandPrepareScriptGpu = ";mkdir -p output;mkdir -p code;mkdir -p dataset;mkdir -p pretrainmodel;echo \"start loading script\";wget -q https://openi.pcl.ac.cn/OpenIOSSG/%s/archive/master.zip;" + | |||
| "echo \"finish loading script\";unzip -q master.zip;cd %s;chmod 777 downloader_for_obs uploader_for_npu downloader_for_minio uploader_for_gpu;" | |||
| ) | |||
| @@ -36,7 +36,7 @@ func getHookTemplates() (hookNames, hookTpls, giteaHookTpls, sizeLimitTpls []str | |||
| fmt.Sprintf("#!/usr/bin/env %s\n\"%s\" hook --config='%s' post-receive\n", setting.ScriptType, setting.AppPath, setting.CustomConf), | |||
| } | |||
| sizeLimitTpls = []string{ | |||
| fmt.Sprintf("#!/usr/bin/env %s\n\n\nset -o pipefail\n\nreadonly DEFAULT_FILE_MAXSIZE_MB=\"30\" \nreadonly CONFIG_NAME=\"hooks.maxfilesize\"\nreadonly NULLSHA=\"0000000000000000000000000000000000000000\"\nreadonly EXIT_SUCCESS=0\nreadonly EXIT_FAILURE=1\nreadonly DEFAULT_REPO_MAXSIZE_MB=\"1024\" \nreadonly CHECK_FLAG_ON=1\n\n\nstatus=\"$EXIT_SUCCESS\"\n\n# skip this hook entirely if shell check is not open\ncheck_flag=${PUSH_SIZE_CHECK_FLAG}\nif [[ $check_flag != $CHECK_FLAG_ON ]]; then\nexit $EXIT_SUCCESS\nfi\n\n\n#######################################\n# check the file max size limit\n#######################################\n\n# get maximum filesize (from repository-specific config)\nmaxsize_mb=\"${REPO_MAX_FILE_SIZE}\"\n\nif [[ \"$?\" != $EXIT_SUCCESS ]]; then\necho \"failed to get ${CONFIG_NAME} from config\"\nexit \"$EXIT_FAILURE\"\nfi\n\npush_size=\"0\"\n# read lines from stdin (format: \"<oldref> <newref> <refname>\\n\")\nwhile read oldref newref refname; do\n# skip branch deletions\nif [[ \"$newref\" == \"$NULLSHA\" ]]; then\n continue\nfi\n\n# find large objects\n# check all objects from $oldref (possible $NULLSHA) to $newref, but\n# skip all objects that have already been accepted (i.e. are referenced by\n# another branch or tag).\n\nnew_branch_flag=0\nif [[ \"$oldref\" == \"$NULLSHA\" ]]; then\n target=\"$newref\"\n new_branch_flag=1\n echo \"You are creating a new remote branch,openI will check all files in commit history to find oversize files\"\nelse\n target=\"${oldref}..${newref}\"\nfi\nmaxsize=`expr $maxsize_mb \\* 1048576` \n\n# find objects in this push_size\n# print like:\n# 08da8e2ab9ae4095bf94dd71ac913132b880b463 commit 214\n# 43e993b768ede5740e8c65de2ed6edec25053ea1 tree 185\n# 4476971d76569039df7569af1b8d03c288f6b193 blob 20167318 b0417e6593a1.zip\nfiles=\"$(git rev-list --objects \"$target\" | \\\n git cat-file $'--batch-check=%%(objectname) %%(objecttype) %%(objectsize) %%(rest)' | \\\n awk -F ' ' -v maxbytes=\"$maxsize\" 'BEGIN {totalIn=0} {if( $3 > maxbytes && $2 == \"blob\") { totalIn+=$3; print $4} else { totalIn+=$3}} END { printf (\"totalIn=\\t%%s\",totalIn)}' )\"\n \nif [[ \"$?\" != $EXIT_SUCCESS ]]; then\n echo \"failed to check for large files in ref ${refname}\"\n continue\nfi\n\nIFS=$'\\n'\n# rewrite IFS to seperate line in $files\nfor file in $files; do\n # if don't unset IFS,temp_array=(${file}) will get error answer\n \n if [[ ${file} == totalIn=* ]]; then\n\tIFS=$'\\t'\n\ttemp_array=(${file})\n\tpush_size=${temp_array[1]}\n\tcontinue\n fi\n\tunset IFS\n if [[ \"$status\" == $EXIT_SUCCESS ]]; then\n\t\techo -e \"Error: Your push was rejected because it contains files larger than $(numfmt --to=iec \"$maxsize_mb\") Mb\"\n\t\techo \"help document -- https://git.openi.org.cn/zeizei/OpenI_Learning/src/branch/master/docs/git/repository_capacity_help.md\"\n\t\techo \"oversize files:\"\n\t\tstatus=\"$EXIT_FAILURE\"\t\n fi\n echo -e \"\\033[31m- ${file}\\033[0m \"\ndone\n\nif [[ \"$status\" != $EXIT_SUCCESS ]]; then\n\texit \"$status\"\nfi\n\ndone\n\n#######################################\n# check the repo max size limit\n#######################################\nif [[ $push_size -eq \"0\" ]]; then\n\texit $EXIT_SUCCESS\nfi\n\n# if create new branch or tag,use count-objects -v to get pack size\nif [[ $new_branch_flag -eq 1 ]]; then\n size_kb=`git count-objects -v | grep 'size-pack' | sed 's/.*\\(size-pack:\\).//'`\n size_pack_kb=`git count-objects -v | grep 'size:' | sed 's/.*\\(size:\\).//'`\n\ttotal_kb=`expr $size_kb + $size_pack_kb`\n\tlet push_size=$total_kb*1024\nfi\n\nsizelimit_mb=\"${REPO_MAX_SIZE}\"\nlet sizelimit_b=$sizelimit_mb*1024*1024\n\n# repo size at here means the size of repo directory in server \nreposize_b=${REPO_CURRENT_SIZE}\n\ntotal=`expr $push_size + $reposize_b`\n\nif [ $total -gt $sizelimit_b ]; then\n echo \"Error: Your push was rejected because the repository size is large than $sizelimit_mb Mb\"\n echo \"see the help document--https://git.openi.org.cn/zeizei/OpenI_Learning/src/branch/master/docs/git/repository_capacity_help.md\"\n exit $EXIT_FAILURE\nfi\n\n\nexit $EXIT_SUCCESS", setting.ScriptType), | |||
| fmt.Sprintf("#!/usr/bin/env %s\n\n\nset -o pipefail\n\nreadonly DEFAULT_FILE_MAXSIZE_MB=\"30\" \nreadonly CONFIG_NAME=\"hooks.maxfilesize\"\nreadonly NULLSHA=\"0000000000000000000000000000000000000000\"\nreadonly EXIT_SUCCESS=0\nreadonly EXIT_FAILURE=1\nreadonly DEFAULT_REPO_MAXSIZE_MB=\"1024\" \nreadonly CHECK_FLAG_ON=1\n\n\nstatus=\"$EXIT_SUCCESS\"\n\n# skip this hook entirely if shell check is not open\ncheck_flag=${PUSH_SIZE_CHECK_FLAG}\nif [[ $check_flag != $CHECK_FLAG_ON ]]; then\nexit $EXIT_SUCCESS\nfi\n\n\n#######################################\n# check the file max size limit\n#######################################\n\n# get maximum filesize (from repository-specific config)\nmaxsize_mb=\"${REPO_MAX_FILE_SIZE}\"\n\nif [[ \"$?\" != $EXIT_SUCCESS ]]; then\necho \"failed to get ${CONFIG_NAME} from config\"\nexit \"$EXIT_FAILURE\"\nfi\n\npush_size=\"0\"\n# read lines from stdin (format: \"<oldref> <newref> <refname>\\n\")\nwhile read oldref newref refname; do\n# skip branch deletions\nif [[ \"$newref\" == \"$NULLSHA\" ]]; then\n continue\nfi\n\n# find large objects\n# check all objects from $oldref (possible $NULLSHA) to $newref, but\n# skip all objects that have already been accepted (i.e. are referenced by\n# another branch or tag).\n\nnew_branch_flag=0\nif [[ \"$oldref\" == \"$NULLSHA\" ]]; then\n target=\"$newref\"\n new_branch_flag=1\n echo \"You are creating a new remote branch,openI will check all files in commit history to find oversize files\"\nelse\n target=\"${oldref}..${newref}\"\nfi\nmaxsize=`expr $maxsize_mb \\* 1048576` \n\n# find objects in this push_size\n# print like:\n# 08da8e2ab9ae4095bf94dd71ac913132b880b463 commit 214\n# 43e993b768ede5740e8c65de2ed6edec25053ea1 tree 185\n# 4476971d76569039df7569af1b8d03c288f6b193 blob 20167318 b0417e6593a1.zip\nfiles=\"$(git rev-list --objects \"$target\" | \\\n git cat-file $'--batch-check=%%(objectname) %%(objecttype) %%(objectsize) %%(rest)' | \\\n awk -F ' ' -v maxbytes=\"$maxsize\" 'BEGIN {totalIn=0} {if( $3 > maxbytes && $2 == \"blob\") { totalIn+=$3; print $4} else { totalIn+=$3}} END { printf (\"totalIn=\\t%%s\",totalIn)}' )\"\n \nif [[ \"$?\" != $EXIT_SUCCESS ]]; then\n echo \"failed to check for large files in ref ${refname}\"\n continue\nfi\n\nIFS=$'\\n'\n# rewrite IFS to seperate line in $files\nfor file in $files; do\n # if don't unset IFS,temp_array=(${file}) will get error answer\n \n if [[ ${file} == totalIn=* ]]; then\n\tIFS=$'\\t'\n\ttemp_array=(${file})\n\tpush_size=${temp_array[1]}\n\tcontinue\n fi\n\tunset IFS\n if [[ \"$status\" == $EXIT_SUCCESS ]]; then\n\t\techo -e \"Error: Your push was rejected because it contains files larger than $(numfmt --to=iec \"$maxsize_mb\") Mb\"\n\t\techo \"help document -- https://openi.pcl.ac.cn/zeizei/OpenI_Learning/src/branch/master/docs/git/repository_capacity_help.md\"\n\t\techo \"oversize files:\"\n\t\tstatus=\"$EXIT_FAILURE\"\t\n fi\n echo -e \"\\033[31m- ${file}\\033[0m \"\ndone\n\nif [[ \"$status\" != $EXIT_SUCCESS ]]; then\n\texit \"$status\"\nfi\n\ndone\n\n#######################################\n# check the repo max size limit\n#######################################\nif [[ $push_size -eq \"0\" ]]; then\n\texit $EXIT_SUCCESS\nfi\n\n# if create new branch or tag,use count-objects -v to get pack size\nif [[ $new_branch_flag -eq 1 ]]; then\n size_kb=`git count-objects -v | grep 'size-pack' | sed 's/.*\\(size-pack:\\).//'`\n size_pack_kb=`git count-objects -v | grep 'size:' | sed 's/.*\\(size:\\).//'`\n\ttotal_kb=`expr $size_kb + $size_pack_kb`\n\tlet push_size=$total_kb*1024\nfi\n\nsizelimit_mb=\"${REPO_MAX_SIZE}\"\nlet sizelimit_b=$sizelimit_mb*1024*1024\n\n# repo size at here means the size of repo directory in server \nreposize_b=${REPO_CURRENT_SIZE}\n\ntotal=`expr $push_size + $reposize_b`\n\nif [ $total -gt $sizelimit_b ]; then\n echo \"Error: Your push was rejected because the repository size is large than $sizelimit_mb Mb\"\n echo \"see the help document--https://openi.pcl.ac.cn/zeizei/OpenI_Learning/src/branch/master/docs/git/repository_capacity_help.md\"\n exit $EXIT_FAILURE\nfi\n\n\nexit $EXIT_SUCCESS", setting.ScriptType), | |||
| fmt.Sprintf(""), | |||
| fmt.Sprintf(""), | |||
| } | |||
| @@ -584,6 +584,8 @@ var ( | |||
| TrainJobFLAVORINFOS string | |||
| ModelArtsSpecialPools string | |||
| ModelArtsMultiNode string | |||
| //kanban | |||
| IsCloudbrainTimingEnabled bool | |||
| // modelarts-cd config | |||
| ModelartsCD = struct { | |||
| @@ -1444,7 +1446,7 @@ func NewContext() { | |||
| DecompressOBSTaskName = sec.Key("DecompressOBSTaskName").MustString("LabelDecompressOBSQueue") | |||
| sec = Cfg.Section("homepage") | |||
| RecommentRepoAddr = sec.Key("Address").MustString("https://git.openi.org.cn/OpenIOSSG/promote/raw/branch/master/") | |||
| RecommentRepoAddr = sec.Key("Address").MustString("https://openi.pcl.ac.cn/OpenIOSSG/promote/raw/branch/master/") | |||
| ESSearchURL = sec.Key("ESSearchURL").MustString("http://192.168.207.94:9200") | |||
| INDEXPOSTFIX = sec.Key("INDEXPOSTFIX").MustString("") | |||
| @@ -1609,6 +1611,9 @@ func NewContext() { | |||
| FileNoteBook.ImageNPUDescription = sec.Key("image_npu_desc").MustString("") | |||
| FileNoteBook.ImageNPUCDDescription = sec.Key("image_npu_cd_desc").MustString("") | |||
| sec = Cfg.Section("kanban") | |||
| IsCloudbrainTimingEnabled = sec.Key("ENABLED").MustBool(false) | |||
| getGrampusConfig() | |||
| getModelartsCDConfig() | |||
| getModelConvertConfig() | |||
| @@ -1641,7 +1646,7 @@ func getModelConvertConfig() { | |||
| ModelConvert.MindsporeBootFile = sec.Key("MindsporeBootFile").MustString("convert_mindspore.py") | |||
| ModelConvert.TensorFlowNpuBootFile = sec.Key("TensorFlowNpuBootFile").MustString("convert_tensorflow.py") | |||
| ModelConvert.TensorFlowGpuBootFile = sec.Key("TensorFlowGpuBootFile").MustString("convert_tensorflow_gpu.py") | |||
| ModelConvert.ConvertRepoPath = sec.Key("ConvertRepoPath").MustString("https://git.openi.org.cn/zouap/npu_test") | |||
| ModelConvert.ConvertRepoPath = sec.Key("ConvertRepoPath").MustString("https://openi.pcl.ac.cn/zouap/npu_test") | |||
| ModelConvert.GPU_Resource_Specs_ID = sec.Key("GPU_Resource_Specs_ID").MustInt(1) | |||
| ModelConvert.NPU_FlavorCode = sec.Key("NPU_FlavorCode").MustString("modelarts.bm.910.arm.public.1") | |||
| ModelConvert.NPU_PoolID = sec.Key("NPU_PoolID").MustString("pool7908321a") | |||
| @@ -261,7 +261,7 @@ page_dev_env_desc3_title=Once Configuration, Multiple Reuse | |||
| page_dev_env_desc3_desc=Provide execution environment sharing, Once Configuration, Multiple Reuse. Lower the threshold of model development, and avoid spending repetitive time configuring complex environments. | |||
| page_dev_yunlao=OpenI AI Collaboration Platform | |||
| page_dev_yunlao_desc1=OpenI AI collaboration platform has cooperated with Pengcheng cloud brain and China computing power network (C²NET) can be used to complete AI development tasks by using the rich computing resources of Pengcheng cloud brain and China computing network. | |||
| page_dev_yunlao_desc2=Pengcheng CloudBrain's existing AI computing power is 100p FLOPS@FP16 (billions of half precision floating-point calculations per second), the main hardware infrastructure consists of GPU servers equipped with NVIDIA Tesla V100 and A100, and Atlas 900 AI clusters equipped with Kunpeng and shengteng processors. | |||
| page_dev_yunlao_desc2=Pengcheng CloudBrain is existing AI computing power is 100p FLOPS@FP16 (billions of half precision floating-point calculations per second), the main hardware infrastructure consists of GPU servers equipped with NVIDIA Tesla V100 and A100, and Atlas 900 AI clusters equipped with Kunpeng and shengteng processors. | |||
| page_dev_yunlao_desc3=China computing power network (C²NET) phase I can realize high-speed network interconnection between different artificial intelligence computing centers, and realize reasonable scheduling of computing power and flexible allocation of resources. At present, 11 intelligent computing centers have been connected, and the total scale of computing power is 1924p OPS@FP16. OpenI AI collaboration platform has been connected to Pengcheng Cloud Computing Institute, Chengdu Intelligent Computing Center, Zhongyuan Intelligent Computing Center, Hefei brain and other nodes. | |||
| page_dev_yunlao_desc4=Developers can freely select the corresponding computing resources according to the use needs, and can test the adaptability, performance, stability, etc. of the model in different hardware environments. | |||
| page_dev_yunlao_desc5=If your model requires more computing resources, you can also apply for it separately. | |||
| @@ -353,8 +353,10 @@ account_activated = Account has been activated | |||
| prohibit_login = Sign In Prohibited | |||
| prohibit_login_desc = Your account is prohibited to sign in, please contact your site administrator. | |||
| resent_limit_prompt = You have already requested an activation email recently. Please wait 3 minutes and try again. | |||
| has_unconfirmed_mail = Hi %s, you have an unconfirmed email address (<b>%s</b>). If you haven't received a confirmation email or need to resend a new one, please click on the button below. | |||
| resend_mail = Click here to resend your activation email | |||
| has_unconfirmed_mail = Hi %s, you have an unconfirmed email address (<b>%s</b>). | |||
| has_unconfirmed_mail_resend = If you did not receive the activation email, or need to resend it, please click the "Resend your activation email" button below. | |||
| has_unconfirmed_mail_change =If you need to change your email address before sending an activation email, please click the "Change email" button below. | |||
| resend_mail = Resend your activation email | |||
| email_not_associate = The email address is not associated with any account. | |||
| email_not_main=The email address is wrong, please input your primary email address. | |||
| email_not_right=The email address is not associated with any account, please input the right email address. | |||
| @@ -391,6 +393,7 @@ openid_register_desc = The chosen OpenID URI is unknown. Associate it with a new | |||
| openid_signin_desc = Enter your OpenID URI. For example: https://anne.me, bob.openid.org.cn or gnusocial.net/carry. | |||
| disable_forgot_password_mail = Account recovery is disabled. Please contact your site administrator. | |||
| email_domain_blacklisted = You cannot register with this kind of email address. | |||
| email_domain_blacklisted_change = This type of email address is not currently supported. | |||
| authorize_application = Authorize Application | |||
| authorize_redirect_notice = You will be redirected to %s if you authorize this application. | |||
| authorize_application_created_by = This application was created by %s. | |||
| @@ -1234,7 +1237,7 @@ cloudbrain.benchmark.evaluate_child_type=Child Type | |||
| cloudbrain.benchmark.evaluate_mirror=Mirror | |||
| cloudbrain.benchmark.evaluate_train=Train Script | |||
| cloudbrain.benchmark.evaluate_test=Test Script | |||
| cloudbrain.benchmark.types={"type":[{"id":1,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=detection","first":"Target detection","second":[{"id":1,"value":"None","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"yangzhx","repo_name":"detection_benchmark_script"}]},{"id":2,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=reid","first":"Target re-identification","second":[{"id":1,"value":"Vehicle re-identification","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"},{"id":2,"value":"Image-based person re-identification","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"}]},{"id":3,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=tracking","first":"Multi-target tracking","second":[{"id":1,"value":"None","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"lix07","repo_name":"MOT_benchmark_script"}]}]} | |||
| cloudbrain.benchmark.types={"type":[{"id":1,"rank_link":"https://openi.pcl.ac.cn/benchmark/?username=admin&algType=detection","first":"Target detection","second":[{"id":1,"value":"None","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"yangzhx","repo_name":"detection_benchmark_script"}]},{"id":2,"rank_link":"https://openi.pcl.ac.cn/benchmark/?username=admin&algType=reid","first":"Target re-identification","second":[{"id":1,"value":"Vehicle re-identification","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"},{"id":2,"value":"Image-based person re-identification","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"}]},{"id":3,"rank_link":"https://openi.pcl.ac.cn/benchmark/?username=admin&algType=tracking","first":"Multi-target tracking","second":[{"id":1,"value":"None","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"lix07","repo_name":"MOT_benchmark_script"}]}]} | |||
| cloudbrain.morethanonejob=You already have a running or waiting task, create it after that task is over. | |||
| cloudbrain.morethanonejob1=You have created an <span style="color:rgba(242, 113, 28, 1);"> equivalent task </span> that is waiting or running, please wait for the task to finish before creating it. | |||
| cloudbrain.morethanonejob2=You can view all your Cloud Brain tasks in <a href="/cloudbrains" target="_blank"> Home > Cloudbrain Task </a>. | |||
| @@ -1260,7 +1263,7 @@ model_Evaluation_not_created = Model evaluation has not been created | |||
| repo_not_initialized = Code version: You have not initialized the code repository, please <a href="%s"> initialized </a> first ; | |||
| debug_task_running_limit =Running time: no more than 4 hours, it will automatically stop if it exceeds 4 hours; | |||
| dataset_desc = Dataset: Cloud Brain 1 provides CPU/GPU,Cloud Brain 2 provides Ascend NPU.And dataset also needs to be uploaded to the corresponding environment; | |||
| platform_instructions = Instructions for use: You can refer to the <a href="https://git.openi.org.cn/zeizei/OpenI_Learning"> OpenI_Learning </a> course of Qizhi AI collaboration platform. | |||
| platform_instructions = Instructions for use: You can refer to the <a href="https://openi.pcl.ac.cn/zeizei/OpenI_Learning"> OpenI_Learning </a> course of Qizhi AI collaboration platform. | |||
| platform_instructions1 = Instructions for use: You can refer to the | |||
| platform_instructions2 = OpenI_Learning | |||
| platform_instructions3 = course of Openi AI collaboration platform. | |||
| @@ -356,8 +356,10 @@ account_activated=帐户已激活 | |||
| prohibit_login=禁止登录 | |||
| prohibit_login_desc=您的帐户被禁止登录,请与网站管理员联系。 | |||
| resent_limit_prompt=您请求发送激活邮件过于频繁,请等待 3 分钟后再试! | |||
| has_unconfirmed_mail=%s 您好,系统检测到您有一封发送至 <b>%s</b> 但未被确认的邮件。如果您未收到激活邮件,或需要重新发送,请单击下方的按钮。 | |||
| resend_mail=单击此处重新发送确认邮件 | |||
| has_unconfirmed_mail=%s 您好,系统检测到您有一封发送至 <b>%s</b> 但未被确认的邮件。 | |||
| has_unconfirmed_mail_resend=如果您未收到激活邮件,或需要重新发送,请单击下方的 "重新发送确认邮件 " 按钮。 | |||
| has_unconfirmed_mail_change=如果您需要更改邮箱后再发送激活邮件,请单击下方的 "修改邮箱" 按钮。 | |||
| resend_mail=重新发送确认邮件 | |||
| email_not_associate=您输入的邮箱地址未被关联到任何帐号! | |||
| email_not_main=电子邮箱地址不正确,请输入您设置的主要邮箱地址。 | |||
| email_not_right=您输入了不存在的邮箱地址,请输入正确的邮箱地址。 | |||
| @@ -394,6 +396,7 @@ openid_register_desc=所选的 OpenID URI 未知。在这里关联一个新帐 | |||
| openid_signin_desc=输入您的 OpenID URI。例如: https://anne.me、bob.openid.org.cn 或 gnusocial.net/carry。 | |||
| disable_forgot_password_mail=帐户恢复功能已被禁用。请与网站管理员联系。 | |||
| email_domain_blacklisted=暂不支持此类电子邮件地址注册。 | |||
| email_domain_blacklisted_change=暂不支持此类电子邮件地址。 | |||
| authorize_application=应用授权 | |||
| authorize_redirect_notice=如果您授权此应用,您将会被重定向到 %s。 | |||
| authorize_application_created_by=此应用由%s创建。 | |||
| @@ -1245,8 +1248,8 @@ cloudbrain.benchmark.evaluate_child_type=子类型 | |||
| cloudbrain.benchmark.evaluate_mirror=镜像 | |||
| cloudbrain.benchmark.evaluate_train=训练程序 | |||
| cloudbrain.benchmark.evaluate_test=测试程序 | |||
| cloudbrain.benchmark.types={"type":[{"id":1,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=detection","first":"目标检测","second":[{"id":1,"value":"无","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"yangzhx","repo_name":"detection_benchmark_script"}]},{"id":2,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=reid","first":"目标重识别","second":[{"id":1,"value":"车辆重识别","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"},{"id":2,"value":"基于图像的行人重识别","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"}]},{"id":3,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=tracking","first":"多目标跟踪","second":[{"id":1,"value":"无","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"lix07","repo_name":"MOT_benchmark_script"}]}]} | |||
| cloudbrain.benchmark.model.types={"type":[{"id":1,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=detection","first":"目标检测","second":[{"id":1,"value":"无","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"yangzhx","repo_name":"detection_benchmark_script"}]},{"id":2,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=reid","first":"目标重识别","second":[{"id":1,"value":"车辆重识别","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"},{"id":2,"value":"基于图像的行人重识别","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"}]},{"id":3,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=tracking","first":"多目标跟踪","second":[{"id":1,"value":"无","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"lix07","repo_name":"MOT_benchmark_script"}]}]} | |||
| cloudbrain.benchmark.types={"type":[{"id":1,"rank_link":"https://openi.pcl.ac.cn/benchmark/?username=admin&algType=detection","first":"目标检测","second":[{"id":1,"value":"无","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"yangzhx","repo_name":"detection_benchmark_script"}]},{"id":2,"rank_link":"https://openi.pcl.ac.cn/benchmark/?username=admin&algType=reid","first":"目标重识别","second":[{"id":1,"value":"车辆重识别","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"},{"id":2,"value":"基于图像的行人重识别","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"}]},{"id":3,"rank_link":"https://openi.pcl.ac.cn/benchmark/?username=admin&algType=tracking","first":"多目标跟踪","second":[{"id":1,"value":"无","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"lix07","repo_name":"MOT_benchmark_script"}]}]} | |||
| cloudbrain.benchmark.model.types={"type":[{"id":1,"rank_link":"https://openi.pcl.ac.cn/benchmark/?username=admin&algType=detection","first":"目标检测","second":[{"id":1,"value":"无","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"yangzhx","repo_name":"detection_benchmark_script"}]},{"id":2,"rank_link":"https://openi.pcl.ac.cn/benchmark/?username=admin&algType=reid","first":"目标重识别","second":[{"id":1,"value":"车辆重识别","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"},{"id":2,"value":"基于图像的行人重识别","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"}]},{"id":3,"rank_link":"https://openi.pcl.ac.cn/benchmark/?username=admin&algType=tracking","first":"多目标跟踪","second":[{"id":1,"value":"无","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"lix07","repo_name":"MOT_benchmark_script"}]}]} | |||
| cloudbrain.morethanonejob=您已经创建了一个正在等待或运行中的同类任务,请等待任务结束再创建。 | |||
| cloudbrain.morethanonejob1=您已经有 <span style="color:rgba(242, 113, 28, 1);">同类任务</span> 正在等待或运行中,请等待任务结束再创建; | |||
| cloudbrain.morethanonejob2=可以在 “<a href="/cloudbrains" target="_blank" >个人中心 > 云脑任务</a>” 查看您所有的云脑任务。 | |||
| @@ -1272,7 +1275,7 @@ model_Evaluation_not_created = 未创建过评测任务 | |||
| repo_not_initialized = 代码版本:您还没有初始化代码仓库,请先<a href=%s>创建代码版本</a>; | |||
| debug_task_running_limit = 运行时长:最长不超过4个小时,超过4个小时将自动停止; | |||
| dataset_desc = 数据集:云脑1提供 CPU / GPU 资源,云脑2提供 Ascend NPU 资源,调试使用的数据集也需要上传到对应的环境; | |||
| platform_instructions = 使用说明:可以参考启智AI协作平台<a href="https://git.openi.org.cn/zeizei/OpenI_Learning">小白训练营课程</a>。 | |||
| platform_instructions = 使用说明:可以参考启智AI协作平台<a href="https://openi.pcl.ac.cn/zeizei/OpenI_Learning">小白训练营课程</a>。 | |||
| platform_instructions1 = 使用说明:可以参考启智AI协作平台 | |||
| platform_instructions2 = 小白训练营课程 | |||
| platform_instructions3 = 。 | |||
| @@ -606,8 +606,7 @@ function displayRepo(json){ | |||
| if (json != null && json.length > 0){ | |||
| var repoMap = {}; | |||
| for (var i = 0, iLen = json.length; i < iLen; i++) { | |||
| var repo = json[i]; | |||
| var labelSearch = repo.Label; | |||
| var repo = json[i]; | |||
| var label = isZh ? repo.Label : repo.Label_en; | |||
| if (repoMap[label]) { | |||
| repoMap[label].push(repo); | |||
| @@ -618,6 +617,7 @@ function displayRepo(json){ | |||
| for (var label in repoMap) { | |||
| var repos = repoMap[label]; | |||
| var labelSearch = repos[0].Label; | |||
| html += `<div class="swiper-slide"><div><a style="color:rgb(50, 145, 248);font-size:16px;font-weight:550;" href="/explore/repos?q=&topic=${labelSearch}&sort=hot"># ${label}</a></div>`; | |||
| for (var i = 0, iLen = repos.length; i < iLen; i++) { | |||
| if (i >= 4) break; | |||
| @@ -810,15 +810,23 @@ function getRecommendModule() { | |||
| function initHomeTopBanner() { | |||
| var homeSlideTimer = null; | |||
| var homeSlideDuration = 8000; | |||
| function homeSlide(direction) { | |||
| function homeSlide(direction, index) { | |||
| var slidePages = $('._hm-pg-c ._hm-pg'); | |||
| var currentPage = slidePages.filter('._hm-pg-show'); | |||
| var slidePagination = $('._hm-slide-pagination-c ._hm-slide-pagination-item'); | |||
| var currentIndex = currentPage.index(); | |||
| var next = direction == 'left' ? currentIndex - 1 : currentIndex + 1; | |||
| var next = 0; | |||
| if (direction) { | |||
| next = direction == 'left' ? currentIndex - 1 : currentIndex + 1; | |||
| } else { | |||
| next = index || 0; | |||
| } | |||
| if (next < 0) next = slidePages.length - 1; | |||
| if (next == slidePages.length) next = 0; | |||
| slidePages.removeClass('_hm-pg-show'); | |||
| slidePages.eq(next).addClass('_hm-pg-show'); | |||
| slidePagination.removeClass('_hm-slide-pagination-item-active'); | |||
| slidePagination.eq(next).addClass('_hm-slide-pagination-item-active'); | |||
| } | |||
| function startSlide() { | |||
| @@ -846,6 +854,12 @@ function initHomeTopBanner() { | |||
| }).on('mouseleave', function() { | |||
| startSlide(); | |||
| }); | |||
| $('._hm-slide-pagination-c ._hm-slide-pagination-item').on('click', function() { | |||
| var self = $(this); | |||
| if (self.hasClass('_hm-slide-pagination-item-active')) return; | |||
| homeSlide('', self.index()); | |||
| startSlide(); | |||
| }); | |||
| setTimeout(function() { startSlide(); }, 500); | |||
| } | |||
| @@ -614,6 +614,7 @@ func RegisterRoutes(m *macaron.Macaron) { | |||
| m.Get("/download_invitation_detail", operationReq, repo_ext.DownloadInvitationDetail) | |||
| //cloudbrain board | |||
| m.Get("/cloudbrainboard/cloudbrain/resource_queues", repo.GetResourceQueues) | |||
| m.Group("/cloudbrainboard", func() { | |||
| m.Get("/downloadAll", repo.DownloadCloudBrainBoard) | |||
| m.Group("/cloudbrain", func() { | |||
| @@ -631,7 +632,6 @@ func RegisterRoutes(m *macaron.Macaron) { | |||
| m.Get("/overview_resource", repo.GetCloudbrainResourceOverview) | |||
| m.Get("/resource_usage_statistic", repo.GetDurationRateStatistic) | |||
| m.Get("/resource_usage_rate_detail", repo.GetCloudbrainResourceUsageDetail) | |||
| m.Get("/resource_queues", repo.GetResourceQueues) | |||
| m.Get("/apitest_for_statistic", repo.CloudbrainDurationStatisticForTest) | |||
| }) | |||
| }, operationReq) | |||
| @@ -11,6 +11,7 @@ import ( | |||
| "io" | |||
| "net/http" | |||
| "os" | |||
| "path" | |||
| "sort" | |||
| "strconv" | |||
| "strings" | |||
| @@ -117,32 +118,31 @@ func GetFileNoteBookInfo(ctx *context.APIContext) { | |||
| return | |||
| } | |||
| waitCountGPU := (*queuesMap)[specGpuQueueCode] | |||
| if !setting.ModelartsCD.Enabled{ | |||
| if !setting.ModelartsCD.Enabled { | |||
| ctx.JSON(http.StatusOK, map[string]interface{}{ | |||
| "code": 0, | |||
| "projectName":setting.FileNoteBook.ProjectName, | |||
| "specCpu": specCPU, | |||
| "specGpu": specGpu, | |||
| "specNpu": specNPU, | |||
| "waitCountGpu": waitCountGPU, | |||
| "waitCountNpu": waitCountNpu, | |||
| "imageCpuDescription": setting.FileNoteBook.ImageCPUDescription, | |||
| "imageGpuDescription": setting.FileNoteBook.ImageGPUDescription, | |||
| "imageNpuDescription": setting.FileNoteBook.ImageNPUDescription, | |||
| "code": 0, | |||
| "projectName": setting.FileNoteBook.ProjectName, | |||
| "specCpu": specCPU, | |||
| "specGpu": specGpu, | |||
| "specNpu": specNPU, | |||
| "waitCountGpu": waitCountGPU, | |||
| "waitCountNpu": waitCountNpu, | |||
| "imageCpuDescription": setting.FileNoteBook.ImageCPUDescription, | |||
| "imageGpuDescription": setting.FileNoteBook.ImageGPUDescription, | |||
| "imageNpuDescription": setting.FileNoteBook.ImageNPUDescription, | |||
| }) | |||
| } else{ | |||
| } else { | |||
| ctx.JSON(http.StatusOK, map[string]interface{}{ | |||
| "code": 0, | |||
| "projectName":setting.FileNoteBook.ProjectName, | |||
| "specCpu": specCPU, | |||
| "specGpu": specGpu, | |||
| "specNpu": specNPUCD, | |||
| "waitCountGpu": waitCountGPU, | |||
| "waitCountNpu": waitCountNpu, | |||
| "imageCpuDescription": setting.FileNoteBook.ImageCPUDescription, | |||
| "imageGpuDescription": setting.FileNoteBook.ImageGPUDescription, | |||
| "imageNpuDescription": setting.FileNoteBook.ImageNPUCDDescription, | |||
| "code": 0, | |||
| "projectName": setting.FileNoteBook.ProjectName, | |||
| "specCpu": specCPU, | |||
| "specGpu": specGpu, | |||
| "specNpu": specNPUCD, | |||
| "waitCountGpu": waitCountGPU, | |||
| "waitCountNpu": waitCountNpu, | |||
| "imageCpuDescription": setting.FileNoteBook.ImageCPUDescription, | |||
| "imageGpuDescription": setting.FileNoteBook.ImageGPUDescription, | |||
| "imageNpuDescription": setting.FileNoteBook.ImageNPUCDDescription, | |||
| }) | |||
| } | |||
| @@ -211,7 +211,7 @@ func GetCloudbrainTask(ctx *context.APIContext) { | |||
| ID := ctx.Params(":id") | |||
| job,err := cloudbrain.GetCloudBrainByIdOrJobId(ID) | |||
| job, err := cloudbrain.GetCloudBrainByIdOrJobId(ID) | |||
| if err != nil { | |||
| ctx.NotFound(err) | |||
| @@ -557,6 +557,12 @@ func ModelSafetyGetLog(ctx *context.APIContext) { | |||
| }) | |||
| return | |||
| } | |||
| prefix := strings.TrimPrefix(path.Join(setting.TrainJobModelPath, job.JobName, modelarts.LogPath, job.VersionName), "/") + "/job" | |||
| _, err = storage.GetObsLogFileName(prefix) | |||
| canLogDownload := isCanDownloadLog(ctx, job) | |||
| if err != nil { | |||
| canLogDownload = false | |||
| } | |||
| ctx.Data["log_file_name"] = resultLogFile.LogFileList[0] | |||
| ctx.JSON(http.StatusOK, map[string]interface{}{ | |||
| "JobID": job.JobID, | |||
| @@ -565,7 +571,7 @@ func ModelSafetyGetLog(ctx *context.APIContext) { | |||
| "EndLine": result.EndLine, | |||
| "Content": result.Content, | |||
| "Lines": result.Lines, | |||
| "CanLogDownload": isCanDownloadLog(ctx, job), | |||
| "CanLogDownload": canLogDownload, | |||
| "StartTime": job.StartTime, | |||
| }) | |||
| } | |||
| @@ -11,6 +11,7 @@ import ( | |||
| "code.gitea.io/gitea/models" | |||
| "code.gitea.io/gitea/modules/context" | |||
| "code.gitea.io/gitea/modules/log" | |||
| "code.gitea.io/gitea/modules/timeutil" | |||
| "code.gitea.io/gitea/routers/repo" | |||
| cloudbrainService "code.gitea.io/gitea/services/cloudbrain" | |||
| "code.gitea.io/gitea/services/cloudbrain/resource" | |||
| @@ -58,42 +59,30 @@ func GetAllCloudbrainsOverview(ctx *context.Context) { | |||
| return | |||
| } | |||
| cloudbrainTypeCount, err := models.GetCloudbrainTypeCount() | |||
| log.Info("cloudbrainTypeCount:", cloudbrainTypeCount) | |||
| if err != nil { | |||
| log.Error("Can not query cloudbrainTypeCount.", err) | |||
| return | |||
| } | |||
| cloudbrainTpyeDurationSum, err := models.GetCloudbrainTpyeDurationSum() | |||
| log.Info("cloudbrainTpyeDurationSum:", cloudbrainTpyeDurationSum) | |||
| if err != nil { | |||
| log.Error("Can not query cloudbrainTpyeDurationSum.", err) | |||
| return | |||
| } | |||
| todayCloudbrainCount, err := models.GetTodayCloudbrainCount(beginTime, endTime) | |||
| log.Info("todayCloudbrainCount:", todayCloudbrainCount) | |||
| if err != nil { | |||
| log.Error("Can not query todayCloudbrainCount.", err) | |||
| return | |||
| } | |||
| todayRunningCount, err := models.GetTodayRunningCount(beginTime, endTime) | |||
| log.Info("todayRunningCount:", todayRunningCount) | |||
| if err != nil { | |||
| log.Error("Can not query todayRunningCount.", err) | |||
| return | |||
| } | |||
| todayWaitingCount, err := models.GetTodayWaitingCount(beginTime, endTime) | |||
| log.Info("todayWaittingCount:", todayWaitingCount) | |||
| if err != nil { | |||
| log.Error("Can not query todayWaitingCount.", err) | |||
| return | |||
| } | |||
| todayCompletedCount := todayCloudbrainCount - todayRunningCount - todayWaitingCount | |||
| log.Info("todayCompletedCount:", todayCompletedCount) | |||
| creatorCount, err := models.GetCreatorCount() | |||
| if err != nil { | |||
| @@ -139,60 +128,48 @@ func GetOverviewDuration(ctx *context.Context) { | |||
| c2NetDuration := int64(0) | |||
| cDCenterDuration := int64(0) | |||
| page := 1 | |||
| pagesize := 10000 | |||
| count := pagesize | |||
| // Each time a maximum of 10000 pieces of data are detected to the memory, batch processing | |||
| for count == pagesize && count != 0 { | |||
| cloudbrains, _, err := models.CloudbrainAllStatic(&models.CloudbrainsOptions{ | |||
| ListOptions: models.ListOptions{ | |||
| Page: page, | |||
| PageSize: pagesize, | |||
| }, | |||
| Type: models.TypeCloudBrainAll, | |||
| BeginTimeUnix: int64(recordBeginTime), | |||
| EndTimeUnix: endTime.Unix(), | |||
| }) | |||
| if err != nil { | |||
| ctx.ServerError("Get cloudbrains failed:", err) | |||
| return | |||
| } | |||
| models.LoadSpecs4CloudbrainInfo(cloudbrains) | |||
| for _, cloudbrain := range cloudbrains { | |||
| cloudbrain = cloudbrainService.UpdateCloudbrainAiCenter(cloudbrain) | |||
| if cloudbrain.Cloudbrain.Spec != nil { | |||
| cardNum = int64(cloudbrain.Cloudbrain.Spec.AccCardsNum) | |||
| } else { | |||
| cardNum = 1 | |||
| } | |||
| if cloudbrain.Cloudbrain.WorkServerNumber >= 1 { | |||
| workServerNumber = int64(cloudbrain.Cloudbrain.WorkServerNumber) | |||
| } else { | |||
| workServerNumber = 1 | |||
| } | |||
| duration := models.ConvertStrToDuration(cloudbrain.TrainJobDuration) | |||
| CardDuration := workServerNumber * int64(cardNum) * duration | |||
| if cloudbrain.Cloudbrain.Type == models.TypeCloudBrainOne { | |||
| cloudBrainOneDuration += duration | |||
| cloudBrainOneCardDuSum += CardDuration | |||
| } else if cloudbrain.Cloudbrain.Type == models.TypeCloudBrainTwo { | |||
| cloudBrainTwoDuration += duration | |||
| cloudBrainTwoCardDuSum += CardDuration | |||
| } else if cloudbrain.Cloudbrain.Type == models.TypeC2Net { | |||
| c2NetDuration += duration | |||
| c2NetCardDuSum += CardDuration | |||
| } else if cloudbrain.Cloudbrain.Type == models.TypeCDCenter { | |||
| cDCenterDuration += duration | |||
| cDNetCardDuSum += CardDuration | |||
| } | |||
| cloudbrains, _, err := models.CloudbrainAllKanBan(&models.CloudbrainsOptions{ | |||
| Type: models.TypeCloudBrainAll, | |||
| BeginTimeUnix: int64(recordBeginTime), | |||
| EndTimeUnix: endTime.Unix(), | |||
| }) | |||
| if err != nil { | |||
| ctx.ServerError("Get cloudbrains failed:", err) | |||
| return | |||
| } | |||
| models.LoadSpecs4CloudbrainInfo(cloudbrains) | |||
| durationAllSum += duration | |||
| cardDuSum += CardDuration | |||
| for _, cloudbrain := range cloudbrains { | |||
| cloudbrain = cloudbrainService.UpdateCloudbrainAiCenter(cloudbrain) | |||
| if cloudbrain.Cloudbrain.Spec != nil { | |||
| cardNum = int64(cloudbrain.Cloudbrain.Spec.AccCardsNum) | |||
| } else { | |||
| cardNum = 1 | |||
| } | |||
| count = len(cloudbrains) | |||
| page += 1 | |||
| if cloudbrain.Cloudbrain.WorkServerNumber >= 1 { | |||
| workServerNumber = int64(cloudbrain.Cloudbrain.WorkServerNumber) | |||
| } else { | |||
| workServerNumber = 1 | |||
| } | |||
| duration := models.ConvertStrToDuration(cloudbrain.TrainJobDuration) | |||
| CardDuration := workServerNumber * int64(cardNum) * duration | |||
| if cloudbrain.Cloudbrain.Type == models.TypeCloudBrainOne { | |||
| cloudBrainOneDuration += duration | |||
| cloudBrainOneCardDuSum += CardDuration | |||
| } else if cloudbrain.Cloudbrain.Type == models.TypeCloudBrainTwo { | |||
| cloudBrainTwoDuration += duration | |||
| cloudBrainTwoCardDuSum += CardDuration | |||
| } else if cloudbrain.Cloudbrain.Type == models.TypeC2Net { | |||
| c2NetDuration += duration | |||
| c2NetCardDuSum += CardDuration | |||
| } else if cloudbrain.Cloudbrain.Type == models.TypeCDCenter { | |||
| cDCenterDuration += duration | |||
| cDNetCardDuSum += CardDuration | |||
| } | |||
| durationAllSum += duration | |||
| cardDuSum += CardDuration | |||
| } | |||
| ctx.JSON(http.StatusOK, map[string]interface{}{ | |||
| "cloudBrainOneCardDuSum": cloudBrainOneCardDuSum, | |||
| @@ -1488,12 +1465,17 @@ func getCloudbrainTimePeroid(ctx *context.Context, recordBeginTime time.Time) (t | |||
| } | |||
| func GetCloudbrainResourceOverview(ctx *context.Context) { | |||
| var recordBeginTime timeutil.TimeStamp | |||
| recordCloudbrainDuration, err := models.GetDurationRecordBeginTime() | |||
| if err != nil { | |||
| log.Error("Can not get GetDurationRecordBeginTime", err) | |||
| return | |||
| } | |||
| recordBeginTime := recordCloudbrainDuration[0].DateTime | |||
| if len(recordCloudbrainDuration) > 0 && err == nil { | |||
| recordBeginTime = recordCloudbrainDuration[0].DateTimeUnix | |||
| } else { | |||
| recordBeginTime = timeutil.TimeStamp(time.Now().Unix()) | |||
| } | |||
| recordUpdateTime := time.Now().Unix() | |||
| resourceQueues, err := models.GetCanUseCardInfo() | |||
| if err != nil { | |||
| @@ -1620,6 +1602,7 @@ func getBeginAndEndTime(ctx *context.Context) (time.Time, time.Time) { | |||
| now := time.Now() | |||
| beginTimeStr := ctx.QueryTrim("beginTime") | |||
| endTimeStr := ctx.QueryTrim("endTime") | |||
| var brainRecordBeginTime time.Time | |||
| var beginTime time.Time | |||
| var endTime time.Time | |||
| @@ -1632,7 +1615,12 @@ func getBeginAndEndTime(ctx *context.Context) (time.Time, time.Time) { | |||
| ctx.Error(http.StatusBadRequest, ctx.Tr("repo.record_begintime_get_err")) | |||
| return beginTime, endTime | |||
| } | |||
| brainRecordBeginTime := recordCloudbrainDuration[0].DateTime.AsTime() | |||
| if len(recordCloudbrainDuration) > 0 && err == nil { | |||
| brainRecordBeginTime = recordCloudbrainDuration[0].DateTimeUnix.AsTime() | |||
| } else { | |||
| brainRecordBeginTime = now | |||
| } | |||
| beginTime = brainRecordBeginTime | |||
| endTime = now | |||
| } else if queryType == "today" { | |||
| @@ -1674,7 +1662,11 @@ func getBeginAndEndTime(ctx *context.Context) (time.Time, time.Time) { | |||
| ctx.Error(http.StatusBadRequest, ctx.Tr("repo.record_begintime_get_err")) | |||
| return beginTime, endTime | |||
| } | |||
| brainRecordBeginTime := recordCloudbrainDuration[0].DateTime.AsTime() | |||
| if len(recordCloudbrainDuration) > 0 && err == nil { | |||
| brainRecordBeginTime = recordCloudbrainDuration[0].DateTimeUnix.AsTime() | |||
| } else { | |||
| brainRecordBeginTime = now | |||
| } | |||
| beginTime = brainRecordBeginTime | |||
| endTime = now | |||
| } else { | |||
| @@ -1705,7 +1697,7 @@ func getAiCenterUsageDuration(beginTime time.Time, endTime time.Time, cloudbrain | |||
| usageRate := float64(0) | |||
| for _, cloudbrainStatistic := range cloudbrainStatistics { | |||
| if int64(cloudbrainStatistic.DateTime) >= beginTime.Unix() && int64(cloudbrainStatistic.DateTime) < endTime.Unix() { | |||
| if int64(cloudbrainStatistic.DateTimeUnix) >= beginTime.Unix() && int64(cloudbrainStatistic.DateTimeUnix) < endTime.Unix() { | |||
| totalDuration += cloudbrainStatistic.CardsTotalDuration | |||
| usageDuration += cloudbrainStatistic.CardsUseDuration | |||
| } | |||
| @@ -1923,7 +1915,7 @@ func CloudbrainUpdateAiCenter(ctx *context.Context) { | |||
| func GetResourceQueues(ctx *context.Context) { | |||
| resourceQueues, err := models.GetCanUseCardInfo() | |||
| if err != nil { | |||
| log.Info("GetCanUseCardInfo err: %v", err) | |||
| log.Error("GetCanUseCardInfo err: %v", err) | |||
| return | |||
| } | |||
| Resource := make([]*models.ResourceQueue, 0) | |||
| @@ -49,7 +49,7 @@ const ( | |||
| //TensorFlowNpuBootFile = "convert_tensorflow.py" | |||
| //TensorFlowGpuBootFile = "convert_tensorflow_gpu.py" | |||
| //ConvertRepoPath = "https://git.openi.org.cn/zouap/npu_test" | |||
| //ConvertRepoPath = "https://openi.pcl.ac.cn/zouap/npu_test" | |||
| CONVERT_FORMAT_ONNX = 0 | |||
| CONVERT_FORMAT_TRT = 1 | |||
| @@ -8,37 +8,39 @@ import ( | |||
| "code.gitea.io/gitea/models" | |||
| "code.gitea.io/gitea/modules/context" | |||
| "code.gitea.io/gitea/modules/log" | |||
| "code.gitea.io/gitea/modules/setting" | |||
| "code.gitea.io/gitea/modules/timeutil" | |||
| cloudbrainService "code.gitea.io/gitea/services/cloudbrain" | |||
| ) | |||
| func CloudbrainDurationStatisticHour() { | |||
| var statisticTime time.Time | |||
| var count int64 | |||
| recordDurationUpdateTime, err := models.GetDurationRecordUpdateTime() | |||
| if err != nil { | |||
| log.Error("Can not get GetDurationRecordBeginTime", err) | |||
| } | |||
| now := time.Now() | |||
| currentTime := time.Date(now.Year(), now.Month(), now.Day(), now.Hour(), 0, 0, 0, now.Location()) | |||
| if err == nil && len(recordDurationUpdateTime) > 0 { | |||
| statisticTime = time.Unix(int64(recordDurationUpdateTime[0].DateTime), 0).Add(+1 * time.Hour) | |||
| } else { | |||
| statisticTime = currentTime | |||
| } | |||
| deleteBeginTime := time.Unix(int64(recordDurationUpdateTime[0].DateTime), 0) | |||
| if setting.IsCloudbrainTimingEnabled { | |||
| var statisticTime time.Time | |||
| var count int64 | |||
| recordDurationUpdateTime, err := models.GetDurationRecordUpdateTime() | |||
| if err != nil { | |||
| log.Error("Can not get GetDurationRecordBeginTime", err) | |||
| } | |||
| now := time.Now() | |||
| currentTime := time.Date(now.Year(), now.Month(), now.Day(), now.Hour(), 0, 0, 0, now.Location()) | |||
| if err == nil && len(recordDurationUpdateTime) > 0 { | |||
| statisticTime = time.Unix(int64(recordDurationUpdateTime[0].DateTimeUnix), 0).Add(+1 * time.Hour) | |||
| } else { | |||
| statisticTime = currentTime | |||
| } | |||
| err = models.DeleteCloudbrainDurationStatistic(timeutil.TimeStamp(deleteBeginTime.Unix()), timeutil.TimeStamp(currentTime.Unix())) | |||
| if err != nil { | |||
| log.Error("DeleteCloudbrainDurationStatistic failed", err) | |||
| } | |||
| err = models.DeleteCloudbrainDurationStatistic(timeutil.TimeStamp(statisticTime.Add(-1*time.Hour).Unix()), timeutil.TimeStamp(currentTime.Unix())) | |||
| if err != nil { | |||
| log.Error("DeleteCloudbrainDurationStatistic failed", err) | |||
| } | |||
| for statisticTime.Before(currentTime) || statisticTime.Equal(currentTime) { | |||
| countEach := summaryDurationStat(statisticTime) | |||
| count += countEach | |||
| statisticTime = statisticTime.Add(+1 * time.Hour) | |||
| for statisticTime.Before(currentTime) || statisticTime.Equal(currentTime) { | |||
| countEach := summaryDurationStat(statisticTime) | |||
| count += countEach | |||
| statisticTime = statisticTime.Add(+1 * time.Hour) | |||
| } | |||
| log.Info("summaryDurationStat count: %v", count) | |||
| } | |||
| log.Info("summaryDurationStat count: %v", count) | |||
| } | |||
| func UpdateDurationStatisticHistoryData(beginTime time.Time, endTime time.Time) int64 { | |||
| var count int64 | |||
| @@ -55,7 +57,7 @@ func UpdateDurationStatisticHistoryData(beginTime time.Time, endTime time.Time) | |||
| //statisticTime是当前的时辰,比如当前是2019-01-01 12:01:01,那么statisticTime就是2019-01-01 12:00:00 | |||
| func summaryDurationStat(statisticTime time.Time) int64 { | |||
| var count int64 | |||
| dateTime := timeutil.TimeStamp(statisticTime.Add(-1 * time.Hour).Unix()) | |||
| dateTimeUnix := timeutil.TimeStamp(statisticTime.Add(-1 * time.Hour).Unix()) | |||
| beginTime := statisticTime.Add(-1 * time.Hour).Unix() | |||
| dayTime := statisticTime.Add(-1 * time.Hour).Format("2006-01-02") | |||
| hourTime := statisticTime.Add(-1 * time.Hour).Hour() | |||
| @@ -66,27 +68,8 @@ func summaryDurationStat(statisticTime time.Time) int64 { | |||
| log.Info("GetCloudbrainByTime err: %v", err) | |||
| return 0 | |||
| } | |||
| cloudbrainMap := make(map[string]*models.Cloudbrain) | |||
| models.LoadSpecs4CloudbrainInfo(ciTasks) | |||
| for _, cloudbrain := range ciTasks { | |||
| if cloudbrain.Cloudbrain.StartTime == 0 { | |||
| cloudbrain.Cloudbrain.StartTime = cloudbrain.Cloudbrain.CreatedUnix | |||
| } | |||
| if cloudbrain.Cloudbrain.EndTime == 0 { | |||
| cloudbrain.Cloudbrain.EndTime = cloudbrain.Cloudbrain.UpdatedUnix | |||
| } | |||
| cloudbrain = cloudbrainService.UpdateCloudbrainAiCenter(cloudbrain) | |||
| if cloudbrain.Cloudbrain.Spec != nil { | |||
| if _, ok := cloudbrainMap[cloudbrain.Cloudbrain.AiCenter+"/"+cloudbrain.Cloudbrain.Spec.AccCardType]; !ok { | |||
| if cloudbrain.Cloudbrain.Spec != nil { | |||
| cloudbrainMap[cloudbrain.Cloudbrain.AiCenter+"/"+cloudbrain.Cloudbrain.Spec.AccCardType] = &cloudbrain.Cloudbrain | |||
| } | |||
| } | |||
| } | |||
| } | |||
| cloudBrainCenterCodeAndCardTypeInfo := getcloudBrainCenterCodeAndCardTypeInfo(ciTasks, beginTime, endTime) | |||
| cloudBrainCenterCodeAndCardTypeInfo, cloudbrainMap := getcloudBrainCenterCodeAndCardTypeInfo(ciTasks, beginTime, endTime) | |||
| resourceQueues, err := models.GetCanUseCardInfo() | |||
| if err != nil { | |||
| @@ -111,7 +94,7 @@ func summaryDurationStat(statisticTime time.Time) int64 { | |||
| cardsTotalDurationMap[cloudbrainTable.Cluster+"/"+centerCode+"/"+cardType] = 0 | |||
| } | |||
| cloudbrainDurationStat := models.CloudbrainDurationStatistic{ | |||
| DateTime: dateTime, | |||
| DateTimeUnix: dateTimeUnix, | |||
| DayTime: dayTime, | |||
| HourTime: hourTime, | |||
| Cluster: cloudbrainTable.Cluster, | |||
| @@ -133,7 +116,7 @@ func summaryDurationStat(statisticTime time.Time) int64 { | |||
| for key, cardsTotalDuration := range cardsTotalDurationMap { | |||
| cloudbrainDurationStat := models.CloudbrainDurationStatistic{ | |||
| DateTime: dateTime, | |||
| DateTimeUnix: dateTimeUnix, | |||
| DayTime: dayTime, | |||
| HourTime: hourTime, | |||
| Cluster: strings.Split(key, "/")[0], | |||
| @@ -170,11 +153,27 @@ func GetAiCenterNameByCode(centerCode string, language string) string { | |||
| return aiCenterName | |||
| } | |||
| func getcloudBrainCenterCodeAndCardTypeInfo(ciTasks []*models.CloudbrainInfo, beginTime int64, endTime int64) map[string]map[string]int { | |||
| func getcloudBrainCenterCodeAndCardTypeInfo(ciTasks []*models.CloudbrainInfo, beginTime int64, endTime int64) (map[string]map[string]int, map[string]*models.Cloudbrain) { | |||
| var WorkServerNumber int | |||
| var AccCardsNum int | |||
| cloudbrainMap := make(map[string]*models.Cloudbrain) | |||
| cloudBrainCenterCodeAndCardType := make(map[string]map[string]int) | |||
| for _, cloudbrain := range ciTasks { | |||
| if cloudbrain.Cloudbrain.StartTime == 0 { | |||
| cloudbrain.Cloudbrain.StartTime = cloudbrain.Cloudbrain.CreatedUnix | |||
| } | |||
| if cloudbrain.Cloudbrain.EndTime == 0 { | |||
| cloudbrain.Cloudbrain.EndTime = timeutil.TimeStamp(time.Now().Unix()) | |||
| } | |||
| cloudbrain = cloudbrainService.UpdateCloudbrainAiCenter(cloudbrain) | |||
| if cloudbrain.Cloudbrain.Spec != nil { | |||
| if _, ok := cloudbrainMap[cloudbrain.Cloudbrain.AiCenter+"/"+cloudbrain.Cloudbrain.Spec.AccCardType]; !ok { | |||
| if cloudbrain.Cloudbrain.Spec != nil { | |||
| cloudbrainMap[cloudbrain.Cloudbrain.AiCenter+"/"+cloudbrain.Cloudbrain.Spec.AccCardType] = &cloudbrain.Cloudbrain | |||
| } | |||
| } | |||
| } | |||
| cloudbrain = cloudbrainService.UpdateCloudbrainAiCenter(cloudbrain) | |||
| if cloudbrain.Cloudbrain.StartTime == 0 { | |||
| cloudbrain.Cloudbrain.StartTime = cloudbrain.Cloudbrain.CreatedUnix | |||
| @@ -196,7 +195,7 @@ func getcloudBrainCenterCodeAndCardTypeInfo(ciTasks []*models.CloudbrainInfo, be | |||
| cloudBrainCenterCodeAndCardType[cloudbrain.Cloudbrain.AiCenter] = make(map[string]int) | |||
| } | |||
| if cloudbrain.Cloudbrain.Spec != nil { | |||
| if cloudbrain.Cloudbrain.Status == string(models.ModelArtsRunning) { | |||
| if cloudbrain.Cloudbrain.Status == string(models.ModelArtsRunning) && cloudbrain.Cloudbrain.DeletedAt.IsZero() { | |||
| if _, ok := cloudBrainCenterCodeAndCardType[cloudbrain.Cloudbrain.AiCenter][cloudbrain.Cloudbrain.Spec.AccCardType]; !ok { | |||
| if int64(cloudbrain.Cloudbrain.StartTime) < beginTime { | |||
| cloudBrainCenterCodeAndCardType[cloudbrain.Cloudbrain.AiCenter][cloudbrain.Cloudbrain.Spec.AccCardType] = AccCardsNum * WorkServerNumber * (int(endTime) - int(beginTime)) | |||
| @@ -240,7 +239,7 @@ func getcloudBrainCenterCodeAndCardTypeInfo(ciTasks []*models.CloudbrainInfo, be | |||
| } | |||
| } | |||
| return cloudBrainCenterCodeAndCardType | |||
| return cloudBrainCenterCodeAndCardType, cloudbrainMap | |||
| } | |||
| func CloudbrainUpdateHistoryData(ctx *context.Context) { | |||
| @@ -258,7 +257,7 @@ func CloudbrainUpdateHistoryData(ctx *context.Context) { | |||
| endTimeUnix := timeutil.TimeStamp(endTime.Unix()) | |||
| err = models.DeleteCloudbrainDurationStatistic(beginTimeUnix, endTimeUnix) | |||
| count = UpdateDurationStatisticHistoryData(beginTime.Add(+1*time.Hour), endTime) | |||
| count = UpdateDurationStatisticHistoryData(beginTime.Add(+1*time.Hour), endTime.Add(+1*time.Hour)) | |||
| } | |||
| ctx.JSON(http.StatusOK, map[string]interface{}{ | |||
| "message": 0, | |||
| @@ -240,9 +240,9 @@ func Notebook2Create(ctx *context.Context, form auth.CreateModelArtsNotebookForm | |||
| } | |||
| if setting.ModelartsCD.Enabled { | |||
| _, err = modelarts_cd.GenerateNotebook(ctx, displayJobName, jobName, uuid, description, imageId, spec, "",modelarts.AutoStopDurationMs) | |||
| _, err = modelarts_cd.GenerateNotebook(ctx, displayJobName, jobName, uuid, description, imageId, spec, "", modelarts.AutoStopDurationMs) | |||
| } else { | |||
| _, err = modelarts.GenerateNotebook2(ctx, displayJobName, jobName, uuid, description, imageId, spec, "",modelarts.AutoStopDurationMs) | |||
| _, err = modelarts.GenerateNotebook2(ctx, displayJobName, jobName, uuid, description, imageId, spec, "", modelarts.AutoStopDurationMs) | |||
| } | |||
| if err != nil { | |||
| @@ -388,33 +388,31 @@ func NotebookDebug2(ctx *context.Context) { | |||
| ctx.RenderWithErr(err.Error(), tplModelArtsNotebookIndex, nil) | |||
| return | |||
| } | |||
| if task.BootFile!=""{ | |||
| ctx.Redirect(getFileUrl(result.Url,task.BootFile) + "?token="+ result.Token) | |||
| }else{ | |||
| if task.BootFile != "" { | |||
| ctx.Redirect(getFileUrl(result.Url, task.BootFile) + "?token=" + result.Token) | |||
| } else { | |||
| ctx.Redirect(result.Url + "?token=" + result.Token) | |||
| } | |||
| } | |||
| func getFileUrl(url string,filename string) string{ | |||
| middle:="" | |||
| if url[len(url)-3:]=="lab" || url[len(url)-4:]=="lab/" { | |||
| func getFileUrl(url string, filename string) string { | |||
| middle := "" | |||
| if url[len(url)-3:] == "lab" || url[len(url)-4:] == "lab/" { | |||
| if url[len(url)-1] == '/' { | |||
| middle="tree/" | |||
| middle = "tree/" | |||
| } else { | |||
| middle= "/tree/" | |||
| middle = "/tree/" | |||
| } | |||
| }else{ | |||
| } else { | |||
| if url[len(url)-1] == '/' { | |||
| middle = "lab/tree/" | |||
| } else { | |||
| middle= "/lab/tree/" | |||
| middle = "/lab/tree/" | |||
| } | |||
| } | |||
| return url+middle+path.Base(filename) | |||
| return url + middle + path.Base(filename) | |||
| } | |||
| func NotebookRestart(ctx *context.Context) { | |||
| @@ -446,7 +444,7 @@ func NotebookRestart(ctx *context.Context) { | |||
| } else { | |||
| if count >= 1 { | |||
| log.Error("the user already has running or waiting task", ctx.Data["MsgID"]) | |||
| resultCode="2" | |||
| resultCode = "2" | |||
| errorMsg = ctx.Tr("repo.cloudbrain.morethanonejob") | |||
| break | |||
| } | |||
| @@ -1435,7 +1435,7 @@ func UpdateEmailPost(ctx *context.Context, form auth.UpdateEmailForm) { | |||
| ctx.ServerError("UpdateEmailAddress failed", err) | |||
| return | |||
| } | |||
| ctx.Data["Email"] = newEmailAddress | |||
| ctx.Data["SignedUser.Email"] = newEmailAddress | |||
| ctx.User.Email = newEmailAddress | |||
| Activate(ctx) | |||
| @@ -50,10 +50,10 @@ | |||
| }); | |||
| })(); | |||
| </script> | |||
| <a href="https://git.openi.org.cn/zeizei/OpenI_Learning" class="item" target="_blank"><i class="compass icon" ></i> {{.i18n.Tr "custom.Platform_Tutorial"}}</a> | |||
| <a href="https://openi.pcl.ac.cn/zeizei/OpenI_Learning" class="item" target="_blank"><i class="compass icon" ></i> {{.i18n.Tr "custom.Platform_Tutorial"}}</a> | |||
| {{if .EnableSwagger}}<a href="/api/swagger" class="item"><i class="plug icon"></i> API</a>{{end}} | |||
| {{if .IsSigned}} | |||
| <a href="https://git.openi.org.cn/zeizei/OpenI_Learning/issues/new" class="item" target="_blank"><i class="envelope icon"></i> {{.i18n.Tr "custom.foot.advice_feedback"}}</a> | |||
| <a href="https://openi.pcl.ac.cn/zeizei/OpenI_Learning/issues/new" class="item" target="_blank"><i class="envelope icon"></i> {{.i18n.Tr "custom.foot.advice_feedback"}}</a> | |||
| {{else}} | |||
| <a href="{{AppSubUrl}}/user/login" class="item"><i class="envelope icon"></i> {{.i18n.Tr "custom.foot.advice_feedback"}}</a> | |||
| {{end}} | |||
| @@ -46,10 +46,10 @@ | |||
| }); | |||
| })(); | |||
| </script> | |||
| <a href="https://git.openi.org.cn/zeizei/OpenI_Learning" class="item" target="_blank"><i class="compass icon"></i> {{.i18n.Tr "custom.Platform_Tutorial"}} </a> | |||
| <a href="https://openi.pcl.ac.cn/zeizei/OpenI_Learning" class="item" target="_blank"><i class="compass icon"></i> {{.i18n.Tr "custom.Platform_Tutorial"}} </a> | |||
| {{if .EnableSwagger}}<a href="/api/swagger" class="item"><i class="plug icon" ></i> API</a>{{end}} | |||
| {{if .IsSigned}} | |||
| <a href="https://git.openi.org.cn/zeizei/OpenI_Learning/issues/new" class="item" target="_blank"><i class="envelope icon"></i> {{.i18n.Tr "custom.foot.advice_feedback"}}</a> | |||
| <a href="https://openi.pcl.ac.cn/zeizei/OpenI_Learning/issues/new" class="item" target="_blank"><i class="envelope icon"></i> {{.i18n.Tr "custom.foot.advice_feedback"}}</a> | |||
| {{else}} | |||
| <a href="{{AppSubUrl}}/user/login" class="item"><i class="envelope icon"></i> {{.i18n.Tr "custom.foot.advice_feedback"}}</a> | |||
| {{end}} | |||
| @@ -191,7 +191,7 @@ | |||
| {{svg "octicon-question" 16}} | |||
| {{.i18n.Tr "help"}}<!-- Help --> | |||
| </a--> | |||
| <a class="item" href="https://git.openi.org.cn/zeizei/OpenI_Learning" target="_blank"> | |||
| <a class="item" href="https://openi.pcl.ac.cn/zeizei/OpenI_Learning" target="_blank"> | |||
| <i class="tutorial_icon"> | |||
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"> | |||
| <path fill="none" d="M0 0h24v24H0z"/><path d="M2 3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992A.993.993 0 0 1 2 20.007V3.993zM12 5v14h8V5h-8zm1 2h6v2h-6V7zm0 3h6v2h-6v-2z"/> | |||
| @@ -246,7 +246,7 @@ | |||
| </form> | |||
| {{if .ShowRegistrationButton}} | |||
| {{if .IsCourse}} | |||
| <a class="item{{if .PageIsSignUp}} active{{end}}" href="https://git.openi.org.cn/user/sign_up" target="_blank"> | |||
| <a class="item{{if .PageIsSignUp}} active{{end}}" href="https://openi.pcl.ac.cn/user/sign_up" target="_blank"> | |||
| {{svg "octicon-person" 16}} {{.i18n.Tr "register"}} | |||
| </a> | |||
| {{else}} | |||
| @@ -256,7 +256,7 @@ | |||
| {{end}} | |||
| {{end}} | |||
| {{if .IsCourse}} | |||
| <a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="https://git.openi.org.cn/user/login?course=true" target="_blank"> | |||
| <a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="https://openi.pcl.ac.cn/user/login?course=true" target="_blank"> | |||
| {{svg "octicon-sign-in" 16}} {{.i18n.Tr "sign_in"}} | |||
| </a> | |||
| {{else}} | |||
| @@ -186,7 +186,7 @@ | |||
| {{svg "octicon-question" 16}} | |||
| {{.i18n.Tr "help"}}<!-- Help --> | |||
| </a--> | |||
| <a class="item" href="https://git.openi.org.cn/zeizei/OpenI_Learning" target="_blank"> | |||
| <a class="item" href="https://openi.pcl.ac.cn/zeizei/OpenI_Learning" target="_blank"> | |||
| <i class="tutorial_icon"> | |||
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"> | |||
| <path fill="none" d="M0 0h24v24H0z"/><path d="M2 3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992A.993.993 0 0 1 2 20.007V3.993zM12 5v14h8V5h-8zm1 2h6v2h-6V7zm0 3h6v2h-6v-2z"/> | |||
| @@ -168,7 +168,7 @@ | |||
| {{svg "octicon-question" 16}} | |||
| {{.i18n.Tr "help"}}<!-- Help --> | |||
| </a--> | |||
| <a class="item" href="https://git.openi.org.cn/zeizei/OpenI_Learning" target="_blank"> | |||
| <a class="item" href="https://openi.pcl.ac.cn/zeizei/OpenI_Learning" target="_blank"> | |||
| <i class="tutorial_icon"> | |||
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"> | |||
| <path fill="none" d="M0 0h24v24H0z"/><path d="M2 3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992A.993.993 0 0 1 2 20.007V3.993zM12 5v14h8V5h-8zm1 2h6v2h-6V7zm0 3h6v2h-6v-2z"/> | |||
| @@ -189,7 +189,7 @@ | |||
| {{svg "octicon-question" 16}} | |||
| {{.i18n.Tr "help"}}<!-- Help --> | |||
| </a--> | |||
| <a class="item" href="https://git.openi.org.cn/zeizei/OpenI_Learning" target="_blank"> | |||
| <a class="item" href="https://openi.pcl.ac.cn/zeizei/OpenI_Learning" target="_blank"> | |||
| <i class="tutorial_icon"> | |||
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"> | |||
| <path fill="none" d="M0 0h24v24H0z"/><path d="M2 3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992A.993.993 0 0 1 2 20.007V3.993zM12 5v14h8V5h-8zm1 2h6v2h-6V7zm0 3h6v2h-6v-2z"/> | |||
| @@ -425,6 +425,23 @@ | |||
| ._hm-pg-bg-2 { | |||
| background: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%221%22%20x1%3D%220%22%20x2%3D%221%22%20y1%3D%220%22%20y2%3D%220%22%20gradientTransform%3D%22matrix(6.117110761741029e-17%2C%200.999%2C%20-0.21820798177083334%2C%206.117110761741029e-17%2C%200%2C%200)%22%3E%3Cstop%20stop-color%3D%22%239c6af2%22%20stop-opacity%3D%221%22%20offset%3D%220%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%2363d0f9%22%20stop-opacity%3D%221%22%20offset%3D%220.78%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%2378fbed%22%20stop-opacity%3D%221%22%20offset%3D%221%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url(%231)%22%3E%3C%2Frect%3E%3C%2Fsvg%3E"); | |||
| } | |||
| ._hm-pg-bg-3-placeholder-1 { | |||
| position: absolute; | |||
| width: 100%; | |||
| height: 51%; | |||
| top: 0; | |||
| left: 0; | |||
| background-color: #2e035f; | |||
| display: none; | |||
| } | |||
| ._hm-pg-bg-3-placeholder-2 { | |||
| position: absolute; | |||
| height: 50%; | |||
| width: 100%; | |||
| bottom: 0; | |||
| left: 0; | |||
| display: none; | |||
| } | |||
| ._hm-pg-bg-3 { | |||
| background: url("/img/home-banner-01.jpg"); | |||
| background-repeat: no-repeat; | |||
| @@ -464,6 +481,31 @@ | |||
| border-left: none; | |||
| } | |||
| ._hm-slide-pagination-c { | |||
| position: absolute; | |||
| display: none; | |||
| z-index: 30; | |||
| text-align: center; | |||
| height: 30px; | |||
| width: 100%; | |||
| bottom: 0; | |||
| } | |||
| ._hm-slide-pagination-item { | |||
| display: inline-block; | |||
| width: 8px; | |||
| height: 8px; | |||
| background: rgb(185, 227, 244); | |||
| border-radius: 100%; | |||
| margin: 0 2px; | |||
| cursor: pointer; | |||
| } | |||
| ._hm-slide-pagination-item-active { | |||
| width: 40px; | |||
| border-radius: 4px; | |||
| cursor: default; | |||
| } | |||
| ._hm-circle { | |||
| position: absolute; | |||
| top: 180px; | |||
| @@ -1658,13 +1700,102 @@ | |||
| .homenews .swiper-slide .content { | |||
| color: white; | |||
| } | |||
| @media only screen and (max-width: 767px) { | |||
| ._hm-pg-bg-1 { | |||
| background: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%3E%3Cdefs%3E%3CradialGradient%20id%3D%221%22%20cx%3D%220%22%20cy%3D%220%22%20r%3D%221%22%20gradientTransform%3D%22matrix(-1.393%2C%200.2919999999999999%2C%20-0.06390807221064813%2C%20-1.395786%2C%201%2C%200.997)%22%3E%3Cstop%20stop-color%3D%22%233b83fe%22%20stop-opacity%3D%221%22%20offset%3D%220%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%232abcff%22%20stop-opacity%3D%221%22%20offset%3D%220.51%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%238e4cb7%22%20stop-opacity%3D%221%22%20offset%3D%221%22%3E%3C%2Fstop%3E%3C%2FradialGradient%3E%3C%2Fdefs%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url(%231)%22%3E%3C%2Frect%3E%3C%2Fsvg%3E"); | |||
| background-size: 1500px 700px; | |||
| background-position: center center; | |||
| } | |||
| ._hm-person-area { | |||
| display: none; | |||
| } | |||
| ._hm-bubble-c { | |||
| display: none; | |||
| } | |||
| #homenews { | |||
| display: none; | |||
| } | |||
| ._hm-universe { | |||
| top: -70px; | |||
| left: 10%; | |||
| } | |||
| ._hm-big-descr { | |||
| font-size: 20px; | |||
| } | |||
| ._hm-big-btn-1 { | |||
| height: 56px; | |||
| } | |||
| ._hm-big-btn-2 { | |||
| width: 125px; | |||
| margin-right: 10px; | |||
| } | |||
| ._hm-circle-rect { | |||
| left: 0; | |||
| } | |||
| ._hm-pg-bg-3-placeholder-1 { | |||
| display: block; | |||
| } | |||
| ._hm-pg-bg-3-placeholder-2 { | |||
| display: block; | |||
| background: url(/img/home-banner-01.jpg); | |||
| background-repeat: no-repeat; | |||
| background-position: center center; | |||
| background-size: cover; | |||
| } | |||
| ._hm-pg-bg-3-placeholder-2-en { | |||
| background: url(/img/home-banner-01-en.jpg); | |||
| background-repeat: no-repeat; | |||
| background-position: center center; | |||
| background-size: cover; | |||
| } | |||
| ._hm-pg-bg-3 { | |||
| background: none; | |||
| } | |||
| ._hm-bg-descr-vedio-link { | |||
| display: block; | |||
| margin-left: 0px !important; | |||
| margin-top: 10px; | |||
| } | |||
| ._hm-slide-btn { | |||
| display: none; | |||
| } | |||
| ._hm-slide-pagination-c { | |||
| display: block; | |||
| } | |||
| ._hm-big-title-en { | |||
| font-size: 32px; | |||
| margin-bottom: 20px; | |||
| margin-top: -32px; | |||
| } | |||
| ._hm-big-title-mobile-margin-top { | |||
| margin-top: -40px; | |||
| margin-bottom: 26px; | |||
| } | |||
| ._hm-big-title-mobile-margin-top-en { | |||
| margin-top: -50px; | |||
| margin-bottom: 8px; | |||
| } | |||
| ._hm-computing-net-container { | |||
| display: none !important; | |||
| } | |||
| ._hm-computing-net-mobile-container { | |||
| display: block !important; | |||
| background-image: url("/rotation3D/img/baseimg.png"); | |||
| background-position: center center; | |||
| background-repeat: no-repeat; | |||
| background-size: cover; | |||
| padding: 45% 0; | |||
| } | |||
| } | |||
| </style> | |||
| <div class="_hm-bg-container"> | |||
| <div class="_hm-pg _hm-pg-static"> | |||
| <div class="_hm-circle-rect _hm-transition-common _hm-shake"></div> | |||
| </div> | |||
| <div class="_hm-pg-c"> | |||
| <div class="_hm-pg _hm-pg-bg-1 _hm-pg-show"> | |||
| <div class="_hm-circle-rect _hm-transition-common _hm-shake"></div> | |||
| <div class="_hm-universe"> | |||
| <div class="_hm-universe-1 _hm-swing"></div> | |||
| <div class="_hm-universe-2"></div> | |||
| @@ -1741,18 +1872,18 @@ | |||
| </div> | |||
| <div class="_hm-txt-content-c"> | |||
| <div class="_hm-big-txt-1"> | |||
| <div class="_hm-big-title" style="animation:_hm-slide-in-left-once 0.5s">{{.i18n.Tr "home.page_title"}}</div> | |||
| <div class="_hm-big-title {{if ne $.Lang "zh-CN"}}_hm-big-title-en{{end}}" style="animation:_hm-slide-in-left-once 0.5s">{{.i18n.Tr "home.page_title"}}</div> | |||
| <div class="_hm-big-descr">{{.i18n.Tr "home.page_description"}}</div> | |||
| </div> | |||
| <div class="_hm-big-btn-c"> | |||
| <a href="https://git.openi.org.cn/zeizei/OpenI_Learning"> | |||
| <a href="https://openi.pcl.ac.cn/zeizei/OpenI_Learning"> | |||
| <div class="_hm-big-btn-2"> | |||
| <svg xmlns="http://www.w3.org/2000/svg" style="margin-right:8px;margin-top:-2px;" class="styles__StyledSVGIconPathComponent-sc-16fsqc8-0 fPsHiw svg-icon-path-icon fill" viewBox="0 0 32 32" width="16" height="16"><defs data-reactroot=""></defs><g><path fill="rgb(255, 255, 255)" d="M2.667 5.324c0.005-0.729 0.594-1.318 1.322-1.324h24.022c0.731 0 1.323 0.593 1.323 1.324v21.352c-0.005 0.729-0.594 1.318-1.322 1.324h-24.022c-0.731-0.001-1.323-0.593-1.323-1.324v0-21.352zM14.667 6.667h-9.333v18.667h9.333v-18.667zM17.333 6.667v18.667h9.333v-18.667h-9.333zM18.667 9.333h6.667v2.667h-6.667v-2.667zM18.667 13.333h6.667v2.667h-6.667v-2.667z"></path></g></svg> | |||
| {{.i18n.Tr "custom.Platform_Tutorial"}} | |||
| </div> | |||
| </a> | |||
| <a href="/resource_desc"> | |||
| <div class="_hm-big-btn-2"> | |||
| <div class="_hm-big-btn-2" style="margin-right:0;"> | |||
| <svg xmlns="http://www.w3.org/2000/svg" style="margin-right:8px;margin-top:-2px;" class="styles__StyledSVGIconPathComponent-sc-16fsqc8-0 fPsHiw svg-icon-path-icon fill" viewBox="0 0 32 32" width="16" height="16"><defs data-reactroot=""></defs><g><path fill="rgb(255, 255, 255)" d="M16 29.333c-7.364 0-13.333-5.969-13.333-13.333s5.969-13.333 13.333-13.333 13.333 5.969 13.333 13.333-5.969 13.333-13.333 13.333zM12.947 26.223c-1.254-2.597-2.063-5.628-2.241-8.827l-0.003-0.062h-5.287c0.551 4.238 3.518 7.661 7.455 8.869l0.076 0.020zM13.373 17.333c0.201 3.252 1.131 6.307 2.627 9.003 1.469-2.597 2.418-5.669 2.624-8.941l0.003-0.061h-5.253zM26.584 17.333h-5.287c-0.181 3.261-0.99 6.292-2.306 9.033l0.062-0.143c4.012-1.229 6.98-4.651 7.525-8.836l0.006-0.054zM5.416 14.667h5.287c0.181-3.261 0.99-6.292 2.306-9.033l-0.062 0.143c-4.012 1.229-6.98 4.652-7.525 8.836l-0.006 0.054zM13.375 14.667h5.251c-0.209-3.334-1.157-6.405-2.68-9.109l0.055 0.106c-1.469 2.597-2.418 5.669-2.624 8.941l-0.003 0.061zM19.053 5.777c1.254 2.597 2.063 5.628 2.241 8.827l0.003 0.062h5.287c-0.551-4.238-3.518-7.661-7.455-8.869l-0.076-0.020z"></path></g></svg> | |||
| {{.i18n.Tr "custom.resource_description"}} | |||
| </div> | |||
| @@ -1864,7 +1995,7 @@ | |||
| </div> | |||
| <div class="_hm-txt-content-c"> | |||
| <div class="_hm-big-txt-2"> | |||
| <div class="_hm-big-title" style="animation:_hm-slide-in-left-once 0.5s">{{.i18n.Tr "home.c2net_title"}}</div> | |||
| <div class="_hm-big-title {{if ne $.Lang "zh-CN"}}_hm-big-title-en{{end}}" style="animation:_hm-slide-in-left-once 0.5s">{{.i18n.Tr "home.c2net_title"}}</div> | |||
| <div class="_hm-big-descr">{{.i18n.Tr "home.c2net_desc" }}</div> | |||
| </div> | |||
| <div class="_hm-big-btn-c"> | |||
| @@ -1881,11 +2012,13 @@ | |||
| </div> | |||
| --> | |||
| <div class="_hm-pg _hm-pg-bg-3 {{if ne $.Lang "zh-CN"}}_hm-pg-bg-3-en{{end}}"> | |||
| <div class="_hm-pg-bg-3-placeholder-1"></div> | |||
| <div class="_hm-pg-bg-3-placeholder-2 {{if ne $.Lang "zh-CN"}}_hm-pg-bg-3-placeholder-2-en{{end}}"></div> | |||
| <div class="_hm-txt-content-c"> | |||
| <div class="_hm-big-txt-2"> | |||
| <div class="_hm-big-title" style="animation:_hm-slide-in-left-once 0.5s">{{.i18n.Tr "home.c2net_title"}}</div> | |||
| <div class="_hm-big-title {{if ne $.Lang "zh-CN"}}_hm-big-title-en{{end}} _hm-big-title-mobile-margin-top {{if ne $.Lang "zh-CN"}}_hm-big-title-mobile-margin-top-en{{end}}" style="animation:_hm-slide-in-left-once 0.5s">{{.i18n.Tr "home.c2net_title"}}</div> | |||
| <div class="_hm-big-descr">{{.i18n.Tr "home.c2net_desc" }} | |||
| <a target="_blank;" href="https://openi.org.cn/html/2022/openi-o_0623/646.html" style="margin-left:4px;font-size:18px;color:white;"> | |||
| <a class="_hm-bg-descr-vedio-link" target="_blank;" href="https://openi.org.cn/html/2022/openi-o_0623/646.html" style="margin-left:4px;font-size:18px;color:white;"> | |||
| <div style="display:inline-block;"> | |||
| <span style="border-bottom:2px solid white;">{{.i18n.Tr "home.vedio_detail"}}</span> | |||
| <i style="vertical-align:bottom;" class="ri-play-circle-line"></i> | |||
| @@ -1899,6 +2032,10 @@ | |||
| </div> | |||
| <div class="_hm-slide-btn _hm-slide-btn-left"></div> | |||
| <div class="_hm-slide-btn _hm-slide-btn-right"></div> | |||
| <div class="_hm-slide-pagination-c"> | |||
| <div class="_hm-slide-pagination-item _hm-slide-pagination-item-active"></div> | |||
| <div class="_hm-slide-pagination-item"></div> | |||
| </div> | |||
| </div> | |||
| <div class="ui container _hm-container"> | |||
| <div class="_hm-recommend-info "> | |||
| @@ -109,6 +109,7 @@ | |||
| -webkit-box-orient: vertical; | |||
| -webkit-line-clamp: 2; | |||
| max-height: 50px; | |||
| height: 40px; | |||
| white-space: break-spaces; | |||
| } | |||
| </style> | |||
| @@ -46,49 +46,49 @@ | |||
| {{end}}--> | |||
| <div class="swiper-slide"> | |||
| <div class="ui card"> | |||
| <a class="image" href="https://git.openi.org.cn/OpenI"> | |||
| <a class="image" href="https://openi.pcl.ac.cn/OpenI"> | |||
| <img src="/img/org-openi@2x-80.jpg" alt="OpenI 启智社区" title="OpenI 启智社区"> | |||
| </a> | |||
| </div> | |||
| </div> | |||
| <div class="swiper-slide"> | |||
| <div class="ui card"> | |||
| <a class="image" href="https://git.openi.org.cn/JDOpenISCT"> | |||
| <a class="image" href="https://openi.pcl.ac.cn/JDOpenISCT"> | |||
| <img src="/img/org-jd@2x-80.jpg" alt="京东智能供应链开源工具" title="京东智能供应链开源工具"> | |||
| </a> | |||
| </div> | |||
| </div> | |||
| <div class="swiper-slide"> | |||
| <div class="ui card"> | |||
| <a class="image" href="https://git.openi.org.cn/OpenI/TensorLayerX"> | |||
| <a class="image" href="https://openi.pcl.ac.cn/OpenI/TensorLayerX"> | |||
| <img src="/img/org-tensorlayer@2x-80.jpg" alt="TensorLayer" title="TensorLayer"> | |||
| </a> | |||
| </div> | |||
| </div> | |||
| <div class="swiper-slide"> | |||
| <div class="ui card"> | |||
| <a class="image" href="https://git.openi.org.cn/PCL-Platform.Intelligence"> | |||
| <a class="image" href="https://openi.pcl.ac.cn/PCL-Platform.Intelligence"> | |||
| <img src="/img/org-platform@2x-80.jpg" alt="PCL-Platform.Intelligence" title="PCL-Platform.Intelligence"> | |||
| </a> | |||
| </div> | |||
| </div> | |||
| <div class="swiper-slide"> | |||
| <div class="ui card"> | |||
| <a class="image" href="https://git.openi.org.cn/BAAI"> | |||
| <a class="image" href="https://openi.pcl.ac.cn/BAAI"> | |||
| <img src="/img/org-baai@2x-80.jpg" alt="BAAI" title="BAAI"> | |||
| </a> | |||
| </div> | |||
| </div> | |||
| <div class="swiper-slide"> | |||
| <div class="ui card"> | |||
| <a class="image" href="https://git.openi.org.cn/OpenModelZoo"> | |||
| <a class="image" href="https://openi.pcl.ac.cn/OpenModelZoo"> | |||
| <img src="/img/org-modelzoo@2x-80.jpg" alt="OpenModelZoo" title="OpenModelZoo"> | |||
| </a> | |||
| </div> | |||
| </div> | |||
| <div class="swiper-slide"> | |||
| <div class="ui card"> | |||
| <a class="image" href="https://git.openi.org.cn/PCL_EngineClub"> | |||
| <a class="image" href="https://openi.pcl.ac.cn/PCL_EngineClub"> | |||
| <img src="/img/org-engineclub@2x-80.jpg" alt="PCL_EngineClub" title="PCL_EngineClub"> | |||
| </a> | |||
| </div> | |||
| @@ -9,31 +9,31 @@ | |||
| <div class="item"> | |||
| <i class="sticky note outline icon"></i> | |||
| <div class="content"> | |||
| <div ><a href="https://git.openi.org.cn/OpenI/aiforge/wiki">启智AI开发协同平台使用说明</a></div> | |||
| <div ><a href="https://openi.pcl.ac.cn/OpenI/aiforge/wiki">启智AI开发协同平台使用说明</a></div> | |||
| </div> | |||
| </div> | |||
| <div class="item"> | |||
| <i class="sticky note outline icon"></i> | |||
| <div class="content"> | |||
| <div ><a href="https://git.openi.org.cn/OpenI/Paddle/wiki">启智飞桨 Paddle 2.0 项目手册</a></div> | |||
| <div ><a href="https://openi.pcl.ac.cn/OpenI/Paddle/wiki">启智飞桨 Paddle 2.0 项目手册</a></div> | |||
| </div> | |||
| </div> | |||
| <div class="item"> | |||
| <i class="sticky note outline icon"></i> | |||
| <div class="content"> | |||
| <div ><a href="https://git.openi.org.cn/OpenI/aiforge/wiki/cloudbrain">启智社区使用云脑计算资源进行调试说明</a></div> | |||
| <div ><a href="https://openi.pcl.ac.cn/OpenI/aiforge/wiki/cloudbrain">启智社区使用云脑计算资源进行调试说明</a></div> | |||
| </div> | |||
| </div> | |||
| <div class="item"> | |||
| <i class="sticky note outline icon"></i> | |||
| <div class="content"> | |||
| <div ><a href="https://git.openi.org.cn/PCL-Federated.Learning.Middleware/HiStar/wiki">海星HiStar:联邦深度学习中间件帮助文档</a></div> | |||
| <div ><a href="https://openi.pcl.ac.cn/PCL-Federated.Learning.Middleware/HiStar/wiki">海星HiStar:联邦深度学习中间件帮助文档</a></div> | |||
| </div> | |||
| </div> | |||
| <div class="item"> | |||
| <i class="sticky note outline icon"></i> | |||
| <div class="content"> | |||
| <div ><a href="https://git.openi.org.cn/OpenI/octopus/wiki/启智章鱼">启智章鱼开源项目文档</a></div> | |||
| <div ><a href="https://openi.pcl.ac.cn/OpenI/octopus/wiki/启智章鱼">启智章鱼开源项目文档</a></div> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| @@ -26,8 +26,7 @@ | |||
| <h2>{{.i18n.Tr "home.c2net_title"}}</h2> | |||
| <p><span class="ui text grey">{{.i18n.Tr "home.c2net_desc"}}</p> | |||
| </div> | |||
| <div id="app" v-cloak> | |||
| <div id="app" class="_hm-computing-net-container" v-cloak> | |||
| <!--底座--> | |||
| <div class="rotation3D-baseMap"></div> | |||
| <!--旋转3D--> | |||
| @@ -69,6 +68,7 @@ | |||
| </div> | |||
| </div> | |||
| </div><!--rotation3D end--> | |||
| <div class="_hm-computing-net-mobile-container" style="display:none;"></div> | |||
| </div> | |||
| </div> | |||
| @@ -116,7 +116,7 @@ | |||
| <div class="ui sixteen wide mobile six wide tablet four wide computer column"> | |||
| <div class=" ui bottom attached segment text center noborder text center" > | |||
| <a style="width: 80%;" class="ui green button bpadding" href="https://git.openi.org.cn/course/create" target="_blank"><i class="ri-folder-add-line" style="vertical-align: middle;"></i> {{.i18n.Tr "org.release_course"}} </a> | |||
| <a style="width: 80%;" class="ui green button bpadding" href="https://openi.pcl.ac.cn/course/create" target="_blank"><i class="ri-folder-add-line" style="vertical-align: middle;"></i> {{.i18n.Tr "org.release_course"}} </a> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| @@ -185,7 +185,7 @@ | |||
| {{if .IsSigned}} | |||
| <a class="ui blue basic button" onclick="jion_course_team()" style="width: 80%;"> <i class="ri-user-add-line"></i> {{.i18n.Tr "org.teams.join_teams"}}</a> | |||
| {{else}} | |||
| <a class="ui blue basic button" href="https://git.openi.org.cn/user/login?course=true" style="width: 80%;" target="_blank"> <i class="ri-user-add-line"></i> {{.i18n.Tr "org.teams.join_teams"}}</a> | |||
| <a class="ui blue basic button" href="https://openi.pcl.ac.cn/user/login?course=true" style="width: 80%;" target="_blank"> <i class="ri-user-add-line"></i> {{.i18n.Tr "org.teams.join_teams"}}</a> | |||
| {{end}} | |||
| </div> | |||
| </div> | |||
| @@ -113,7 +113,7 @@ | |||
| data-content={{.i18n.Tr "repo.modelarts.train_job.boot_file_helper"}} | |||
| data-position="right center" data-variation="mini"></i> | |||
| </span> | |||
| <a id="benchmark_model_example" href="https://git.openi.org.cn/BDIP/snn4imagenet" | |||
| <a id="benchmark_model_example" href="https://openi.pcl.ac.cn/BDIP/snn4imagenet" | |||
| target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||
| </div> | |||
| @@ -270,7 +270,7 @@ | |||
| <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_train"}}</label> | |||
| <input disabled="disabled" style="width: 33.5%;" name="train_file" id="train_file" | |||
| value="train.py" tabindex="3" autofocus required maxlength="254"> | |||
| <a id="train_href_id" href="https://git.openi.org.cn/CV_benchmark/CV_reID_benchmark" | |||
| <a id="train_href_id" href="https://openi.pcl.ac.cn/CV_benchmark/CV_reID_benchmark" | |||
| target="_blank">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_train"}}</a> | |||
| </div> | |||
| @@ -278,7 +278,7 @@ | |||
| <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_test"}}</label> | |||
| <input disabled="disabled" style="width: 33.5%;" name="test_file" id="test_file" value="test.py" | |||
| tabindex="3" autofocus required maxlength="254"> | |||
| <a id="test_href_id" href="https://git.openi.org.cn/CV_benchmark/CV_reID_benchmark" | |||
| <a id="test_href_id" href="https://openi.pcl.ac.cn/CV_benchmark/CV_reID_benchmark" | |||
| target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||
| </div> | |||
| @@ -349,7 +349,7 @@ | |||
| <label class="label-fix-width" style="font-weight: normal;">推理程序</label> | |||
| <input disabled="disabled" style="width: 33.5%;" name="test_file" id="test_file" value="test.py" | |||
| tabindex="3" autofocus required maxlength="254"> | |||
| <a id="test_href_id" href="https://git.openi.org.cn/CV_benchmark/CV_reID_benchmark" | |||
| <a id="test_href_id" href="https://openi.pcl.ac.cn/CV_benchmark/CV_reID_benchmark" | |||
| target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||
| </div> | |||
| @@ -390,10 +390,10 @@ | |||
| onChange: function (value, text, $selectedItem) { | |||
| if (value === "BRAINSCORE") { | |||
| $('#brainscore_child_type').css('display', 'block') | |||
| $('#benchmark_model_example').attr('href', 'https://git.openi.org.cn/BDIP/similarity2brain_ann') | |||
| $('#benchmark_model_example').attr('href', 'https://openi.pcl.ac.cn/BDIP/similarity2brain_ann') | |||
| } else { | |||
| $('#brainscore_child_type').css('display', 'none') | |||
| $('#benchmark_model_example').attr('href', 'https://git.openi.org.cn/BDIP/snn4imagenet') | |||
| $('#benchmark_model_example').attr('href', 'https://openi.pcl.ac.cn/BDIP/snn4imagenet') | |||
| } | |||
| } | |||
| }) | |||
| @@ -401,11 +401,11 @@ | |||
| function setChildType() { | |||
| let type_id = $('#benchmark_types_id').val(); | |||
| if (type_id == 3) { | |||
| $('#train_href_id').attr('href', 'https://git.openi.org.cn/CV_benchmark/CV_MOT_benchmark'); | |||
| $('#test_href_id').attr('href', 'https://git.openi.org.cn/CV_benchmark/CV_MOT_benchmark'); | |||
| $('#train_href_id').attr('href', 'https://openi.pcl.ac.cn/CV_benchmark/CV_MOT_benchmark'); | |||
| $('#test_href_id').attr('href', 'https://openi.pcl.ac.cn/CV_benchmark/CV_MOT_benchmark'); | |||
| } else { | |||
| $('#train_href_id').attr('href', 'https://git.openi.org.cn/CV_benchmark/CV_reID_benchmark'); | |||
| $('#test_href_id').attr('href', 'https://git.openi.org.cn/CV_benchmark/CV_reID_benchmark'); | |||
| $('#train_href_id').attr('href', 'https://openi.pcl.ac.cn/CV_benchmark/CV_reID_benchmark'); | |||
| $('#test_href_id').attr('href', 'https://openi.pcl.ac.cn/CV_benchmark/CV_reID_benchmark'); | |||
| } | |||
| let child_selected_id = $('#benchmark_child_types_id_hidden').val(); | |||
| $.get(`${repolink}/cloudbrain/benchmark/get_child_types?benchmark_type_id=${type_id}`, (data) => { | |||
| @@ -211,7 +211,7 @@ | |||
| <span > | |||
| <i class="question circle icon" data-content={{.i18n.Tr "repo.modelarts.infer_job.boot_file_helper"}} data-position="top center" data-variation="inverted mini"></i> | |||
| </span> | |||
| <a href="https://git.openi.org.cn/OpenIOSSG/MNIST_PytorchExample_GPU/src/branch/master/inference.py" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||
| <a href="https://openi.pcl.ac.cn/OpenIOSSG/MNIST_PytorchExample_GPU/src/branch/master/inference.py" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||
| </div> | |||
| <!-- 运行参数 --> | |||
| @@ -196,7 +196,7 @@ | |||
| data-content={{.i18n.Tr "repo.modelarts.train_job.boot_file_helper"}} | |||
| data-position="right center" data-variation="mini"></i> | |||
| </span> | |||
| <a href="https://git.openi.org.cn/OpenIOSSG/MNIST_PytorchExample_GPU" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||
| <a href="https://openi.pcl.ac.cn/OpenIOSSG/MNIST_PytorchExample_GPU" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||
| </div> | |||
| <div id="select-multi-dataset"> | |||
| @@ -415,7 +415,7 @@ | |||
| <div class="bgtask-content"> | |||
| <div class="bgtask-content-txt">{{.i18n.Tr "dataset.dataset_explain"}}</div> | |||
| <div class="bgtask-content-txt">{{.i18n.Tr "dataset.dataset_instructions_for_use"}}<a | |||
| href="https://git.openi.org.cn/zeizei/OpenI_Learning"> {{.i18n.Tr "dataset.dataset_camp_course"}}</a></div> | |||
| href="https://openi.pcl.ac.cn/zeizei/OpenI_Learning"> {{.i18n.Tr "dataset.dataset_camp_course"}}</a></div> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| @@ -172,7 +172,7 @@ | |||
| <span> | |||
| <i class="question circle icon link" data-content={{.i18n.Tr "repo.modelarts.train_job.boot_file_helper"}} data-position="right center" data-variation="mini"></i> | |||
| </span> | |||
| <a href="https://git.openi.org.cn/OpenIOSSG/MNIST_PytorchExample_GPU/src/branch/master/train_for_c2net.py" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||
| <a href="https://openi.pcl.ac.cn/OpenIOSSG/MNIST_PytorchExample_GPU/src/branch/master/train_for_c2net.py" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||
| </div> | |||
| @@ -183,7 +183,7 @@ | |||
| <span> | |||
| <i class="question circle icon link" data-content={{.i18n.Tr "repo.modelarts.train_job.boot_file_helper"}} data-position="right center" data-variation="mini"></i> | |||
| </span> | |||
| <a href="https://git.openi.org.cn/OpenIOSSG/MNIST_Example/src/branch/master/train_for_c2net.py" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||
| <a href="https://openi.pcl.ac.cn/OpenIOSSG/MNIST_Example/src/branch/master/train_for_c2net.py" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||
| </div> | |||
| <div id="select-multi-dataset"> | |||
| @@ -133,7 +133,7 @@ | |||
| {{end}} | |||
| <div class="ui tabs container"> | |||
| {{if not .Repository.IsBeingCreated}} | |||
| <div class="ui tabular menu navbar" style="overflow-x:auto;overflow-y:hidden"> | |||
| <div class="ui tabular menu navbar"> | |||
| {{if .Permission.CanRead $.UnitTypeCode}} | |||
| <div class="dropdown-menu"> | |||
| <a class="{{if or .PageIsViewCode .PageIsReleaseList .PageIsWiki .PageIsActivity .PageIsViewCode}}active{{end}} item hover_active" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/{{.BranchNameSubURL | EscapePound}}{{end}}"> | |||
| @@ -218,7 +218,7 @@ | |||
| <span > | |||
| <i class="question circle icon" data-content={{.i18n.Tr "repo.modelarts.infer_job.boot_file_helper"}} data-position="top center" data-variation="inverted mini"></i> | |||
| </span> | |||
| <a href="https://git.openi.org.cn/OpenIOSSG/MINIST_Example" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||
| <a href="https://openi.pcl.ac.cn/OpenIOSSG/MINIST_Example" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||
| </div> | |||
| <!-- 运行参数 --> | |||
| @@ -207,7 +207,7 @@ | |||
| <span> | |||
| <i class="question circle icon link" data-content={{.i18n.Tr "repo.modelarts.train_job.boot_file_helper"}} data-position="right center" data-variation="mini"></i> | |||
| </span> | |||
| <a href="https://git.openi.org.cn/OpenIOSSG/MINIST_Example" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||
| <a href="https://openi.pcl.ac.cn/OpenIOSSG/MINIST_Example" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||
| </div> | |||
| <div id="select-multi-dataset"> | |||
| @@ -195,7 +195,7 @@ | |||
| <span> | |||
| <i class="question circle icon link" data-content={{.i18n.Tr "repo.modelarts.train_job.boot_file_helper"}} data-position="right center" data-variation="mini"></i> | |||
| </span> | |||
| <a href="https://git.openi.org.cn/OpenIOSSG/MINIST_Example" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||
| <a href="https://openi.pcl.ac.cn/OpenIOSSG/MINIST_Example" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||
| </div> | |||
| <div id="select-multi-dataset"> | |||
| @@ -52,7 +52,7 @@ | |||
| {{if eq .MODEL_COUNT 0}} | |||
| <div class="bgtask-content-txt">{{$.i18n.Tr "repo.modelconvert.importfirst1"}}<a href="{{.RepoLink}}/modelmanage/show_model"> {{$.i18n.Tr "repo.modelconvert.importfirst2"}} </a>{{$.i18n.Tr "repo.modelconvert.importfirst3"}}</div> | |||
| {{end}} | |||
| <div class="bgtask-content-txt">{{$.i18n.Tr "repo.platform_instructions1"}}<a href="https://git.openi.org.cn/zeizei/OpenI_Learning"> {{$.i18n.Tr "repo.platform_instructions2"}} </a>{{$.i18n.Tr "repo.platform_instructions3"}}</div> | |||
| <div class="bgtask-content-txt">{{$.i18n.Tr "repo.platform_instructions1"}}<a href="https://openi.pcl.ac.cn/zeizei/OpenI_Learning"> {{$.i18n.Tr "repo.platform_instructions2"}} </a>{{$.i18n.Tr "repo.platform_instructions3"}}</div> | |||
| </div> | |||
| </div> | |||
| @@ -95,7 +95,7 @@ | |||
| {{end}} | |||
| --> | |||
| <div class="bgtask-content-txt">{{$.i18n.Tr "repo.model.manage.createmodel_tip"}}<a href="{{.RepoLink}}/modelarts/train-job"> {{$.i18n.Tr "repo.model.manage.createtrainjob"}}</a></div> | |||
| <div class="bgtask-content-txt">{{$.i18n.Tr "repo.platform_instructions1"}}<a href="https://git.openi.org.cn/zeizei/OpenI_Learning"> {{$.i18n.Tr "repo.platform_instructions2"}} </a>{{$.i18n.Tr "repo.platform_instructions3"}}</div> | |||
| <div class="bgtask-content-txt">{{$.i18n.Tr "repo.platform_instructions1"}}<a href="https://openi.pcl.ac.cn/zeizei/OpenI_Learning"> {{$.i18n.Tr "repo.platform_instructions2"}} </a>{{$.i18n.Tr "repo.platform_instructions3"}}</div> | |||
| </div> | |||
| <div style="display: none;"> | |||
| @@ -260,7 +260,7 @@ | |||
| <span> | |||
| <i class="question circle icon link" data-content={{.i18n.Tr "repo.modelarts.train_job.boot_file_helper"}} data-position="right center" data-variation="mini"></i> | |||
| </span> | |||
| <a href="https://git.openi.org.cn/OpenIOSSG/aisafety" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||
| <a href="https://openi.pcl.ac.cn/OpenIOSSG/aisafety" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||
| </div> | |||
| <div class="inline field min_title required fields" style="width: 95%;"> | |||
| <label class="label-fix-width label-required" style="font-weight: normal;">{{.i18n.Tr "modelsafety.base_data_set"}}</label> | |||
| @@ -15,7 +15,7 @@ | |||
| {{else if .ResendLimited}} | |||
| <p class="center">{{.i18n.Tr "auth.resent_limit_prompt"}}</p> | |||
| {{else}} | |||
| <p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .Email .ActiveCodeLives | Str2html}}</p> | |||
| <p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .SignedUser.Email .ActiveCodeLives | Str2html}}</p> | |||
| {{end}} | |||
| {{else}} | |||
| {{if .IsSendRegisterMail}} | |||
| @@ -23,7 +23,11 @@ | |||
| {{else if .IsActivateFailed}} | |||
| <p>{{.i18n.Tr "auth.invalid_code"}}</p> | |||
| {{else}} | |||
| <p>{{.i18n.Tr "auth.has_unconfirmed_mail" .SignedUser.Name .SignedUser.Email | Str2html}}</p> | |||
| <p style="margin-bottom: 0;">{{.i18n.Tr "auth.has_unconfirmed_mail" .SignedUser.Name .SignedUser.Email | Str2html}}</p> | |||
| <ul style="margin-top: 0;"> | |||
| <li style="line-height: 30px;">{{.i18n.Tr "auth.has_unconfirmed_mail_resend"}}</li> | |||
| <li>{{.i18n.Tr "auth.has_unconfirmed_mail_change"}}</li> | |||
| </ul> | |||
| <div class="ui divider"></div> | |||
| <div class="text right"> | |||
| <button type="button" class="ui blue button change">{{.i18n.Tr "auth.change_email"}}</button> | |||
| @@ -40,18 +44,19 @@ | |||
| <div class="header" style="padding: 1rem;background-color: rgba(240, 240, 240, 100);"> | |||
| <h4>{{.i18n.Tr "auth.change_email_address"}}</h4> | |||
| </div> | |||
| <form id="formId" action="{{AppSubUrl}}/user/update_email" method="POST" class="ui form"> | |||
| <form id="form-email" class="ui form ignore-dirty" action="{{AppSubUrl}}/user/update_email" method="POST" > | |||
| <div class="content content-padding"> | |||
| <div class="ui error message"> | |||
| </div> | |||
| {{$.CsrfTokenHtml}} | |||
| <div class="inline required field"> | |||
| <label>{{.i18n.Tr "auth.new_email_address"}}</label> | |||
| <input style="width: 80%;" id="label" name="NewEmail" maxlength="255" value="{{.SignedUser.Email}}"> | |||
| <input type="email" style="width: 80%;" id="email" name="NewEmail" maxlength="255" value="{{.SignedUser.Email}}" | |||
| pattern="([a-zA-Z0-9_-])+@(163\.com|126\.com|qq\.com|yahoo\.com|sina\.com|sina\.cn|outlook\.com|pcl\.ac\.cn|foxmail\.com|ict\.ac\.cn|21cn\.com|yeah\.net|139\.com)" required> | |||
| </div> | |||
| </div> | |||
| <div class="center actions"> | |||
| <button class="ui green button">{{.i18n.Tr "repo.confirm_choice"}}</button> | |||
| <button id="submitBtn" class="ui green button">{{.i18n.Tr "repo.confirm_choice"}}</button> | |||
| <div class="ui deny button">{{.i18n.Tr "cancel"}}</div> | |||
| </div> | |||
| </form> | |||
| @@ -61,6 +66,19 @@ | |||
| {{template "base/footer" .}} | |||
| <script> | |||
| $('.ui.blue.button.change').on('click',function(){ | |||
| $('.ui.modal').modal('show') | |||
| $('.ui.modal') | |||
| .modal({ | |||
| onShow:function(){ | |||
| $('.ui.dimmer').css({ "background-color": "rgb(136, 136, 136,0.7)" }) | |||
| let emailInput=document.getElementById("email"); | |||
| emailInput.oninvalid = function () { | |||
| this.setCustomValidity('{{.i18n.Tr "auth.email_domain_blacklisted_change"}}') | |||
| } | |||
| emailInput.oninput = function(){ | |||
| this.setCustomValidity('') | |||
| } | |||
| } | |||
| }) | |||
| .modal('show') | |||
| }) | |||
| </script> | |||
| @@ -15,7 +15,7 @@ | |||
| <p class="ui text grey">{{.i18n.Tr "home.provide_resoure"}}</p> | |||
| </div> | |||
| <div class="guide "> | |||
| <a class="mini ui blue basic button" style="font-weight:700" href="https://git.openi.org.cn/zeizei/OpenI_Learning" target="_blank">{{.i18n.Tr "custom.Platform_Tutorial"}} <i class="ri-arrow-right-line" ></i></a> | |||
| <a class="mini ui blue basic button" style="font-weight:700" href="https://openi.pcl.ac.cn/zeizei/OpenI_Learning" target="_blank">{{.i18n.Tr "custom.Platform_Tutorial"}} <i class="ri-arrow-right-line" ></i></a> | |||
| </div> | |||
| </div> | |||
| {{if .EnableHeatmap}} | |||
| @@ -23,7 +23,7 @@ | |||
| <el-input v-model="info.desc" type="textarea" placeholder="请输入内容" :autosize="{minRows:4,maxRows:6}" maxlength="255" show-word-limit></el-input> | |||
| </el-form-item> | |||
| <el-form-item label="主页" prop="index_web" > | |||
| <el-input v-model="info.index_web" placeholder="主页(eg: https://git.openi.org.cn)"></el-input> | |||
| <el-input v-model="info.index_web" placeholder="主页(eg: https://openi.pcl.ac.cn)"></el-input> | |||
| </el-form-item> | |||
| </el-form> | |||
| </div> | |||
| @@ -209,7 +209,7 @@ | |||
| </div> | |||
| <div class="bgtask-content-txt"> | |||
| {{ i18n.dataset_instructions_for_use | |||
| }}<a href="https://git.openi.org.cn/zeizei/OpenI_Learning">{{ | |||
| }}<a href="https://openi.pcl.ac.cn/zeizei/OpenI_Learning">{{ | |||
| i18n.dataset_camp_course | |||
| }}</a> | |||
| </div> | |||
| @@ -7,7 +7,7 @@ | |||
| "left": 50, | |||
| "bottom": 50 | |||
| }, | |||
| "src": "https://git.openi.org.cn/OpenIOSSG/promote/raw/branch/master/imgs/invitation/pic-01.png", | |||
| "src": "https://openi.pcl.ac.cn/OpenIOSSG/promote/raw/branch/master/imgs/invitation/pic-01.png", | |||
| "url": "/user/invitation_tpl", | |||
| "show": true | |||
| }, | |||
| @@ -18,7 +18,7 @@ | |||
| "right": 50, | |||
| "bottom": 50 | |||
| }, | |||
| "src": "https://git.openi.org.cn/OpenIOSSG/promote/raw/branch/master/imgs/invitation/pic-01.png", | |||
| "src": "https://openi.pcl.ac.cn/OpenIOSSG/promote/raw/branch/master/imgs/invitation/pic-01.png", | |||
| "url": "/user/invitation_tpl", | |||
| "show": false | |||
| } | |||
| @@ -4,7 +4,7 @@ | |||
| <h2>{{ $t("dataDesensitizationModelExperience") }}</h2> | |||
| <p> | |||
| {{ $t("dataDesensitizationModelDesc") }} <a | |||
| href="https://git.openi.org.cn/tengxiao/tuomin" | |||
| href="https://openi.pcl.ac.cn/tengxiao/tuomin" | |||
| target="_blank" | |||
| >tengxiao / tuomin</a | |||
| > | |||