Jupyter实训创建的时候带上数据集目录

chromesetting
daiao 5 years ago
parent 75bcacb623
commit 0bf2c43de2

@ -42,6 +42,12 @@ class CreateShixunService < ApplicationService
if !Laboratory.current.main_site?
Laboratory.current.laboratory_shixuns.create!(shixun: shixun, ownership: true)
end
# 如果是jupyter先创建一个目录,为了挂载
if shixun.is_jupyter?
folder = edu_setting('shixun_folder')
path = "#{folder}/#{identifier}"
FileUtils.mkdir_p(path, :mode => 0777) unless File.directory?(dir)
end
return shixun
end
rescue => e

Loading…
Cancel
Save