Submit Job But Never Ran

I am trying to test a bash script on the cloud, but when I submit it, it repeatedly switch between SCHEDULE and QUEUE and never ran. Here is the bash script that I am trying to run: 

 

#!/bin/bash


source /opt/conda/etc/profile.d/conda.sh
conda activate WaifuDiffusion

export FOLDER=/home/kannachan/SeaSalt-Downloader

python $FOLDER/main.py -u "https://danbooru.donmai.us/posts?tags=mika_pikazo" \
       --scraper danbooru \
       --filter tag_filter animated video \
       --saver folder mika_pikazo       

 


I config my job as follows:

 

{
    "taskGroups": [
        {
            "taskSpec": {
                "runnables": [
                    {
                       "script": {
			      "text": "#!/bin.bash\n bash ../run.sh" 
			}
                    }
                ],
                "computeResource": {
                    "cpuMilli": 2000,
                    "memoryMib": 16
                },
                "maxRetryCount": 2,
                "maxRunDuration": "3600s"
            },
            "taskCount": 4,
            "parallelism": 2
        }
    ],
    "allocationPolicy": {
        "instances": [
            {
                "policy": { "machineType": "g2-standard-8" }
            }
        ]
    },
    "labels": {
        "department": "ai",
        "env": "web-scrapper"
    },
    "logsPolicy": {
        "destination": "CLOUD_LOGGING"
    }
}

 

 

Both run.sh and config.json is in the same directory. I ran:
gcloud batch jobs submit batch-job-1 --location us-central1 --config config.json

 

gcloud batch jobs submit batch-job-1 --location us-central1 --config config.json

 

 

0 1 150
1 REPLY 1

Hi @ModernNoob,

Welcome to the Google Cloud Community!

You can try the following troubleshooting options:

  1. In your job config, on line 8, you should change your "text" to "path". Also, try changing "bin.bash" to "bin/bash".
  2. You should also change your file to an executable file. You can do this by using "chmod a+x FILENAME".
  3. You can also get in touch with Google Cloud Support if the above options don't work.

Let me know if it helped, thanks!