jessehostetler commited on
Commit
b5f4aa7
·
1 Parent(s): a82d18b

Add test command for read-only filesystem

Browse files
Files changed (2) hide show
  1. README.md +7 -0
  2. makefile +4 -0
README.md CHANGED
@@ -61,6 +61,13 @@ make docker-test-no-internet
61
 
62
  Note that this won't catch Internet access that happens in your `/predict` endpoint.
63
 
 
 
 
 
 
 
 
64
 
65
  ## What Happens When You Start the Server
66
 
 
61
 
62
  Note that this won't catch Internet access that happens in your `/predict` endpoint.
63
 
64
+ ## Test that your container works with a read-only filesystem
65
+ Your submission will run with a read-only filesystem. The directory `/tmp` will be writeable, but it is limited to `100MiB` of storage. You can test that your container works in this setting by using the flags `--read-only --tmpfs "/tmp"` in your `docker run` command:
66
+
67
+ ```bash
68
+ make docker-test-readonly
69
+ ```
70
+
71
 
72
  ## What Happens When You Start the Server
73
 
makefile CHANGED
@@ -29,6 +29,10 @@ docker-run:
29
  docker-test-no-internet:
30
  docker run --rm -it --network none $(IMAGE)
31
 
 
 
 
 
32
  .PHONY: compile
33
  compile:
34
  uv pip compile --python-version 3.12 --upgrade -o requirements.torch.cpu.txt.tmp requirements.torch.cpu.in
 
29
  docker-test-no-internet:
30
  docker run --rm -it --network none $(IMAGE)
31
 
32
+ .PHONY: docker-test-readonly
33
+ docker-test-readonly:
34
+ docker run --rm -it --read-only --tmpfs "/tmp" $(IMAGE)
35
+
36
  .PHONY: compile
37
  compile:
38
  uv pip compile --python-version 3.12 --upgrade -o requirements.torch.cpu.txt.tmp requirements.torch.cpu.in