Commit c1272fbf authored by BAIRE Anthony's avatar BAIRE Anthony
Browse files

add other comments on job container config

parent d27d6499
Pipeline #40071 failed with stage
in 1 minute and 13 seconds
......@@ -1069,7 +1069,11 @@ class JobManager(Manager):
assert info.version == "sandbox"
image = tmp_img = info.client.commit(ctrl.gen_sandbox_name(webapp), repo, info.version)["Id"]
# ensure that the job dir exists before actually running the job
# (because the docker daemon creates them on-the-fly which makes
# things messy)
ctrl.check_host_path("isdir", job_path)
hc = ctrl.sandbox.create_host_config(
# mount the job data dir at an arbitrary location
# (/work). This is better that using /tmp because it
......@@ -1080,6 +1084,7 @@ class JobManager(Manager):
# disable network access (for security reason)
network_mode = "none",
# enforce resource constraints
cpu_quota = (None if info.cpu is None else (info.cpu * 1024)),
cpu_period = (None if info.cpu is None else 1024),
# cpu_shares = info.cpu,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment