Skip to content

Commit

Permalink
docs: drafted script README files with Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaszanas committed Nov 17, 2024
1 parent 4aa2092 commit ec5cbe8
Show file tree
Hide file tree
Showing 7 changed files with 179 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/datasetpreparator/dir_packager/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File Packager

Utility script for compressing files into a `.zip` archive.
Utility script for compressing a directory into a `.zip` archive.

# CLI Usage

Expand All @@ -15,3 +15,26 @@ options:
--input_dir INPUT_DIR (default = ../../processing/sc2_replaypack_processor/output)
Please provide input path to the directory containing the dataset that is going to be processed by packaging into .zip archives.
```

# Execute With Docker

> [!NOTE]
> There are two ways of executing this script with Docker. One is to use the main repository Dockerfile (available in `docker` directory) and the other is to use the Dockerfile contained in this directory.
## Repository Docker Image

Please refer to the main [README](../../README.md) for the instructions.

## Script Docker Image

Buil the docker image:
```bash
docker build --tag=datasetpreparator:file_packager .
```

Run the docker image (please replace `<paths>`):
```bash
docker run -v "<./input>:/app/input" \
datasetpreparator:file_packager \
python3 dir_packager.py --input_dir /app/input
```
28 changes: 28 additions & 0 deletions src/datasetpreparator/directory_flattener/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,31 @@ options:
--file_extension FILE_EXTENSION (default = .SC2Replay)
Please provide a file extension for files that will be moved and renamed.
```

# Execute With Docker

> [!NOTE]
> There are two ways of executing this script with Docker. One is to use the main repository Dockerfile (available in `docker` directory) and the other is to use the Dockerfile contained in this directory.
## Repository Docker Image

Please refer to the main [README](../../README.md) for the instructions.

## Script Docker Image

Buil the docker image:
```bash
docker build --tag=datasetpreparator:directory_flattener .
```

Run the docker image (please replace `<paths>`):
```bash
docker run
-v "<./input>:/app/input" \
-v "<./output>:/app/output" \
datasetpreparator:file_packager \
python3 directory_flattener.py \
--input_dir /app/input \
--output_dir /app/output \
--file_extension .SC2Replay
```
23 changes: 23 additions & 0 deletions src/datasetpreparator/file_renamer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,26 @@ options:
--input_dir INPUT_DIR (default = ../../processing/sc2_replaypack_processor/output)
Please provide input path to the directory containing the dataset that is going to be processed.
```

# Execute With Docker

> [!NOTE]
> There are two ways of executing this script with Docker. One is to use the main repository Dockerfile (available in `docker` directory) and the other is to use the Dockerfile contained in this directory.
## Repository Docker Image

Please refer to the main [README](../../README.md) for the instructions.

## Script Docker Image

Buil the docker image:
```bash
docker build --tag=datasetpreparator:file_renamer .
```

Run the docker image (please replace `<paths>`):
```bash
docker run -v "<./input>:/app/input" \
datasetpreparator:file_renamer \
python3 file_renamer.py --input_dir /app/input
```
26 changes: 26 additions & 0 deletions src/datasetpreparator/json_merger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,29 @@ options:
--output_filepath OUTPUT_FILEPATH (default = ../../processing/json_merger/merged.json)
Please provide output path where sc2 map files will be downloaded.
```

# Execute With Docker

> [!NOTE]
> There are two ways of executing this script with Docker. One is to use the main repository Dockerfile (available in `docker` directory) and the other is to use the Dockerfile contained in this directory.
## Repository Docker Image

Please refer to the main [README](../../README.md) for the instructions.

## Script Docker Image

Buil the docker image:
```bash
docker build --tag=datasetpreparator:json_merger .
```

Run the docker image (please replace `<paths>`):
```bash
docker run -v "<./input>:/app/input" \
datasetpreparator:file_packager \
python3 json_merger.py \
--json_one /app/input/json1.json \
--json_two /app/input/json2.json \
--output_filepath /app/input/merged.json
```
27 changes: 27 additions & 0 deletions src/datasetpreparator/processed_mapping_copier/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,30 @@ options:
--output_path OUTPUT_PATH (default = ../../processing/sc2_replaypack_processor/output)
Please provide output path where processed_mapping.json will be copied.
```

# Execute With Docker

> [!NOTE]
> There are two ways of executing this script with Docker. One is to use the main repository Dockerfile (available in `docker` directory) and the other is to use the Dockerfile contained in this directory.
## Repository Docker Image

Please refer to the main [README](../../README.md) for the instructions.

## Script Docker Image

Buil the docker image:
```bash
docker build --tag=datasetpreparator:processed_mapping_copier .
```

Run the docker image (please replace `<paths>`):
```bash
docker run \
-v "<./input>:/app/input" \
-v "<./output>:/app/output" \
datasetpreparator:file_packager \
python3 processed_mapping_copier.py \
--input_dir /app/input \
--output_dir /app/output
```
27 changes: 27 additions & 0 deletions src/datasetpreparator/sc2/sc2_map_downloader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,30 @@ options:
--output_path OUTPUT_PATH (default = ../../processing/sc2_map_downloader/output)
Please provide output path where sc2 map files will be downloaded.
```

# Execute With Docker

> [!NOTE]
> There are two ways of executing this script with Docker. One is to use the main repository Dockerfile (available in `docker` directory) and the other is to use the Dockerfile contained in this directory.
## Repository Docker Image

Please refer to the main [README](../../README.md) for the instructions.

## Script Docker Image

Buil the docker image:
```bash
docker build --tag=datasetpreparator:sc2_map_downloader .
```

Run the docker image (please replace `<paths>`):
```bash
docker run \
-v "<./input>:/app/input" \
-v "<./output>:/app/output" \
datasetpreparator:sc2_map_downloader \
python3 dir_packager.py \
--input_dir /app/input \
--output_dir /app/output
```
24 changes: 24 additions & 0 deletions src/datasetpreparator/sc2/sc2reset_replaypack_downloader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,30 @@ Please keep in mind that the ```src/sc2reset_replaypack_downloader.py``` contai
```

# Execute With Docker

> [!NOTE]
> There are two ways of executing this script with Docker. One is to use the main repository Dockerfile (available in `docker` directory) and the other is to use the Dockerfile contained in this directory.
## Repository Docker Image

Please refer to the main [README](../../README.md) for the instructions.

## Script Docker Image

Buil the docker image:
```bash
docker build --tag=datasetpreparator:sc2reset_replaypack_downloader .
```

Run the docker image (please replace `<paths>`):
```bash
docker run -v "<./input>:/app/input" \
datasetpreparator:sc2reset_replaypack_downloader \
python3 sc2reset_replaypack_downloader.py --input_dir /app/input
```


## Citation

SC2ReSet replaypack collection was formally introduced in:
Expand Down

0 comments on commit ec5cbe8

Please sign in to comment.