Skip to content

Commit

Permalink
Update plants example
Browse files Browse the repository at this point in the history
  • Loading branch information
alpegon committed May 15, 2019
1 parent 7b7696a commit a196680
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions examples/plant-classification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,21 @@ scar init -f scar-plant-classification.yaml
2. Upload the processing script to Amazon S3

```sh
scar put -b scar-test/scar-plant-classification -p plant-classification-run.sh
scar put -b scar-test/scar-plants -p plant-classification-run.sh
```

3. Upload an image to the input folder of the bucket (to trigger the image processing)

```sh
wget https://upload.wikimedia.org/wikipedia/commons/thumb/c/ce/Daisy_G%C3%A4nsebl%C3%BCmchen_Bellis_perennis_01.jpg/640px-Daisy_G%C3%A4nsebl%C3%BCmchen_Bellis_perennis_01.jpg -O daisy.jpg
scar put -b scar-test/scar-plant-classification/input -p daisy.jpg
scar put -b scar-test/scar-plants/input -p daisy.jpg
```

If you upload several files, the corresponding jobs will be submitted to AWS Batch. Depending on the number of jobs it may decide to spawn additional EC2 instances in order to cope with the increased workload. Once the executions have finished (you can check the corresponding CloudWatch logs) ...

4. Download the generated files from the S3 bucket

```sh
scar get -b scar-test/scar-plant-classification/output -p /tmp/plant-classification
scar get -b scar-test/scar-plants/output -p /tmp/plant-classification
```

The last command creates an `output/$REQUEST_ID` folder in the `/tmp/plant-classification` path with the files generated by each invocation.
Expand Down
Binary file added examples/plant-classification/daisy.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scar/providers/aws/cloud/batch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM python:3-alpine
ENV SCAR_LOG_PATH='/var/log/'
ENV SUPERVISOR_TYPE='BATCH'

RUN apk add git && git clone --branch storage https://github.com/grycap/faas-supervisor && cd faas-supervisor && pip3 install -U .
RUN pip3 install faas-supervisor

COPY batch_handler.py batch_handler.py

Expand Down

0 comments on commit a196680

Please sign in to comment.