Browse Source

Add an option to download the docker image instead of building it

Ian Goldberg 4 years ago
parent
commit
9ccfe29591
3 changed files with 15 additions and 2 deletions
  1. 6 2
      README.md
  2. 8 0
      download-docker
  3. 1 0
      walkingonions-image.tar.gz.sha256

+ 6 - 2
README.md

@@ -13,14 +13,14 @@ In this repository, you will find:
 
   * **README.md**: this file
   * **client.py**, **dirauth.py**, **network.py**, **relay.py**, **simulator.py**: the source code for the simulator
-  * **build-docker**, **run-docker**, **attach-docker**: scripts to create and run the docker containing the simulator (see below)
+  * **build-docker**, **download-docker**, **run-docker**, **attach-docker**: scripts to create and run the docker containing the simulator (see below)
   * **Dockerfile.in**, **run\_small.in**, **wo\_docker\_start.in**: templates used by build-docker and run-docker
   * **analysis**: a directory containing scripts to analyze the log files produced by the simulator and generate graphs in PDF form.  See [Analyzing the results](#analyzing-the-results) below for more information.
   * **logs**: a directory containing the logs output by the simulator when _we_ ran it.  These are the very logfiles that were processed by the [parselogs.py](analysis/parselogs.py) and [plotdats.py](analysis/plotdats.py) scripts to produce the graphs in the paper.  (When you run the simulator yourself, your log files will end up in a directory called **logdir** that will be created by **run-docker**.)
 
 ## tl;dr
 
-  * `./build-docker`
+  * `./build-docker` _or_ `./download-docker`
   * `./run-docker`
   * Edit the **logdir/run_sims** file to uncomment the simulations you want to run in parallel, noting the memory requirements of each simulation noted in that file.
   * `./attach-docker`
@@ -46,6 +46,10 @@ To accomplish this, when the docker image is run, the **wo\_docker\_start** dock
 
 Run `./build-docker` to create a docker image called `walkingonions`.  This image is meant to be run from this same directory.
 
+### Downloading the docker image
+
+In the event that you're trying to run this software far enough in the future that the packages downloaded by the **Dockerfile** used by the `./build-docker` script are no longer available or compatible, we have put a copy of the built docker image online.  The `./download-docker` script will download it (note: the image is 268 MB), verify its sha256 checksum, and use `docker load` to install the image.  You will need the `wget` and `sha256sum` utilities, in addition to a version of `docker` that hopefully still accepts the docker image format our version (18.03.1-ce) generated.
+
 ## Running the simulator
 
 To start the docker container, use the `./run-docker` command.  This will do several things:

+ 8 - 0
download-docker

@@ -0,0 +1,8 @@
+#!/bin/bash
+
+# Fetch the prebuilt docker image and check its checksum
+wget https://crysp.uwaterloo.ca/software/walkingonions/walkingonions-image.tar.gz
+sha256sum -c walkingonions-image.tar.gz.sha256 || exit 1
+
+# Load the downloaded image
+docker load < walkingonions-image.tar.gz

+ 1 - 0
walkingonions-image.tar.gz.sha256

@@ -0,0 +1 @@
+001047330ff69cca1cc1b0ce8ea8a643519f778fc35b462c7ac1d9c3cd432041  walkingonions-image.tar.gz