Skip to content

Commit

Permalink
Set mounts to cached and delegated as appropriate.
Browse files Browse the repository at this point in the history
This improves build performance on Mac OS.
Also, remove stale comment from Dockerfile.

PiperOrigin-RevId: 320347059
  • Loading branch information
syshafi committed Jul 9, 2020
1 parent 61f724e commit 5bfdf7c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
9 changes: 2 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# This file defines a docker container that can be used to build and test the simulator.
# If your current directory is the one containing this Dockerfile you can run:
# docker build -t "abesim" .
# docker run -t --rm \
# -v $PWD:/root/agent_based_epidemic_sim \
# -v /tmp/bazel_output:/tmp/bazel_output \
# abesim bazel test agent_based_epidemic_sim/...
# This file defines a docker container that can be used to build and test the
# simulator.

FROM ubuntu:20.04

Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ bazel-bin/agent_based_epidemic_sim/applications/home_work/main \
```shell
docker build -t $USER/abesim .

docker run -t --rm -v $PWD:/root/agent_based_epidemic_sim \
-v /tmp/output:/tmp/output -v /tmp/bazel_output:/tmp/bazel_output \
docker run -t --rm -v $PWD:/root/agent_based_epidemic_sim:cached \
-v /tmp/output:/tmp/output:delegated \
-v /tmp/bazel_output:/tmp/bazel_output:delegated \
$USER/abesim \
bazel run -c opt agent_based_epidemic_sim/applications/home_work/main -- \
--simulation_config_pbtxt_path=/root/agent_based_epidemic_sim/agent_based_epidemic_sim/applications/home_work/config.pbtxt \
Expand All @@ -80,8 +81,8 @@ bazel test agent_based_epidemic_sim/...
docker build -t $USER/abesim .

docker run -t --rm \
-v $PWD:/root/agent_based_epidemic_sim \
-v /tmp/bazel_output:/tmp/bazel_output \
-v $PWD:/root/agent_based_epidemic_sim:cached \
-v /tmp/bazel_output:/tmp/bazel_output:delegated \
$USER/abesim bazel test agent_based_epidemic_sim/...
```

Expand Down

0 comments on commit 5bfdf7c

Please sign in to comment.