From 8af902119d8d84e62773ff20fcdad8cbb0c7dac1 Mon Sep 17 00:00:00 2001 From: Olzhas Arystanov Date: Wed, 11 Sep 2024 19:54:20 +0500 Subject: [PATCH] Change default output directory to /output --- .github/workflows/smoke_test.yml | 3 +-- README.md | 2 +- src/compute_horde_prompt_gen/Dockerfile | 7 ++++--- src/compute_horde_prompt_gen/run.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/smoke_test.yml b/.github/workflows/smoke_test.yml index bd31f41..1639032 100644 --- a/.github/workflows/smoke_test.yml +++ b/.github/workflows/smoke_test.yml @@ -28,7 +28,7 @@ jobs: run: | cd src/compute_horde_prompt_gen - python3 run.py --model_name mock --number_of_batches 5 --number_of_prompts_per_batch 20 --uuids uuid1,uuid2,uuid3,uuid4,uuid5 + python3 run.py --output-dir output/ --model_name mock --number_of_batches 5 --number_of_prompts_per_batch 20 --uuids uuid1,uuid2,uuid3,uuid4,uuid5 echo -e "\ngenerated batches:" ls @@ -42,4 +42,3 @@ jobs: fi done echo "OK" - diff --git a/README.md b/README.md index 385c117..cd8676e 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ docker build -t compute-horde-prompt-gen . ### run image ```bash -docker run -v ./output/:/app/output/ compute-horde-prompt-gen --model_name phi3 --number_of_prompts_per_batch 4 --uuids uuid1,uuid2,uuid3 +docker run -v ./output/:/output/ compute-horde-prompt-gen --model_name phi3 --number_of_prompts_per_batch 4 --uuids uuid1,uuid2,uuid3 ``` ### testint diff --git a/src/compute_horde_prompt_gen/Dockerfile b/src/compute_horde_prompt_gen/Dockerfile index 45dd197..14c94cf 100644 --- a/src/compute_horde_prompt_gen/Dockerfile +++ b/src/compute_horde_prompt_gen/Dockerfile @@ -6,15 +6,16 @@ WORKDIR /app # Install Python and system dependencies RUN apt-get update && apt-get install -y \ - python3 \ - python3-pip + python3 \ + python3-pip # Install PyTorch Hugging Face Transformers and other necessary packages RUN pip3 install torch RUN pip3 install transformers sentencepiece accelerate bitsandbytes # Create an output folder -RUN mkdir /app/output +RUN mkdir /output +RUN chown -R 1000:1000 /output # Copy your Python script into the container COPY saved_models/ /app/saved_models/ diff --git a/src/compute_horde_prompt_gen/run.py b/src/compute_horde_prompt_gen/run.py index ce3ec60..d2ee050 100644 --- a/src/compute_horde_prompt_gen/run.py +++ b/src/compute_horde_prompt_gen/run.py @@ -129,7 +129,7 @@ def generate_prompts( parser.add_argument( "--output_folder_path", type=str, - default="output/", + default="/output/", help="Folder path to save the generated prompts to", )