Skip to content

Instantly share code, notes, and snippets.

@clickCA
Created April 22, 2023 04:26
Show Gist options
  • Select an option

  • Save clickCA/c83186c76457c1244d37cbb36d3f2518 to your computer and use it in GitHub Desktop.

Select an option

Save clickCA/c83186c76457c1244d37cbb36d3f2518 to your computer and use it in GitHub Desktop.

To run the command:

  1. Change directory to the folder that contains the input file sort-rand-199999999.txt: cd /path/to/folder
  2. Optionally, replace sort-rand-199999999.txt with another input file. Make sure that the file is located in the current directory.
  3. Run the command: time docker run -v $PWD:/input -v $PWD:/output clickads/terasort:latest ./prog /input/sort-rand-199999999.txt /output/out.txt

This command runs a Docker container that uses the clickads/terasort image and sorts the specified input file from the /input directory to the /output/out.txt file. The time command is used to measure the execution time of the command.

Replace /path/to/folder with the absolute path of the folder that contains the input file. Replace sort-rand-199999999.txt with the filename of the input file you want to use.

Note that the clickads/terasort image is not provided in this snippet and needs to be downloaded separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment