diff --git a/.github/workflows/smoke_test.yml b/.github/workflows/smoke_test.yml index bd31f41..2afca2a 100644 --- a/.github/workflows/smoke_test.yml +++ b/.github/workflows/smoke_test.yml @@ -32,14 +32,13 @@ jobs: echo -e "\ngenerated batches:" ls - ls output/ + ls /output/ echo -e "\nchecking if prompts are generated fine" for i in $(seq 1 5); do - if [ $(cat output/prompts_uuid$i.txt | wc -l) -ne 20 ]; then - echo "Missing prompts: $(cat output/prompts_uuid{$i}.txt)" + if [ $(cat /output/prompts_uuid$i.txt | wc -l) -ne 20 ]; then + echo "Missing prompts: $(cat /output/prompts_uuid{$i}.txt)" exit 1 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", )