Updated on 2024-05-10 GMT+08:00

Caffe Classification Example

This section uses the official Caffe classification example at https://github.com/BVLC/caffe/blob/master/examples/00-classification.ipynb to illustrate how to run Caffe jobs on CCE.

Using CPUs

Create a job using the third-party image bvlc/caffe:cpu. Set the container specifications.

Add the startup command python /home/caffeEx00.py.

Mount the imported OBS volume.

Click Create. After the job execution is complete, go to the outputimg directory of the OBS volume to view the image used for inference.

Log in to the node added in Adding a GPU Node to a Cluster and run the docker logs {Container ID} command to view the classification result. The result is displayed as tabby cat.

Using GPUs

Create a job using the third-party bvlc/caffe:gpu. Set the container specifications.

Add the startup command python /home/caffeEx00_GPU.py.

Mount the imported OBS volume.

Click Create. After the job execution is complete, go to the outputimg directory of the OBS volume to view the image used for inference.

Log in to the node added in Adding a GPU Node to a Cluster and run the docker logs {Container ID} command to view the classification result. The result is displayed as tabby cat.