Skip to content

Commit

Permalink
remove grading containers and attempt to fix network=none issue
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispyles committed Nov 7, 2024
1 parent 83b8770 commit bdd08c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
**v6.0.4:**

* Added `jupyter_server` to grading environment to allow for installation of `nb_conda_kernels`
* Updated Otter Grade to remove grading containers automatically

**v6.0.3:**

Expand Down
11 changes: 6 additions & 5 deletions otter/grade/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,12 @@ def grade_submission(
if pdf_dir:
volumes.append((pdf_path, f"/autograder/submission/{nb_name}.pdf"))

args = {}
if not network:
args["networks"] = "none"

container = docker.container.create(image, command=["/autograder/run_autograder"], **args)
container = docker.container.create(
image,
command=["/autograder/run_autograder"],
networks=["none"] if not network else [],
remove=True,
)

for local_path, container_path in volumes:
docker.container.copy(local_path, (container, container_path))
Expand Down

0 comments on commit bdd08c1

Please sign in to comment.