Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Use a local volume cache while benchmarking using docker-compose.
  • Loading branch information
hardbyte committed Mar 24, 2020
commit f1d81d0bf17afba1f7bd597d60bcae14d7a70800
5 changes: 3 additions & 2 deletions benchmarking/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSI

RUN python -c "import clkhash; print('clkhash version:', clkhash.__version__)"

RUN mkdir /cache
RUN adduser user && \
chown user:user /app /var/log
chown user:user /app /var/log /cache
VOLUME /cache
Comment on lines +20 to +21
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required so that the user has permission to write to the mounted folder.

USER user

ADD . /app

CMD python benchmark.py
9 changes: 7 additions & 2 deletions tools/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ services:
image: data61/anonlink-benchmark:${TAG:-latest}
environment:
- SERVER=http://nginx:8851
- DATA_PATH=/app/cache
- DATA_PATH=/cache
- EXPERIMENT=/app/linkage-bench-cache-experiments.json
- RESULTS_PATH=/app/results.json
depends_on:
Expand All @@ -41,7 +41,9 @@ services:
- worker
- nginx
entrypoint: /bin/sh -c "dockerize -wait tcp://nginx:8851/v1/status -timeout 1m python benchmark.py"

volumes:
- benchmarkdata:/cache

tutorials:
image: data61/anonlink-docs-tutorials:${TAG:-latest}
environment:
Expand All @@ -52,3 +54,6 @@ services:
- worker
- nginx
entrypoint: /bin/sh -c "dockerize -wait tcp://nginx:8851/v1/status -timeout 1m python -m pytest --junitxml=testResults.xml -x --nbval-lax /src"

volumes:
benchmarkdata: