"CharityEngine" (Service Connection)
-
See Also
- ServiceExecute
- ServiceConnect
-
- Service Connections
- AWS
-
- Remote Batch Computation Providers
- CharityEngine
- Workflows
-
-
See Also
- ServiceExecute
- ServiceConnect
-
- Service Connections
- AWS
-
- Remote Batch Computation Providers
- CharityEngine
- Workflows
-
See Also
"CharityEngine" (Service Connection)
This service connection provides direct access to the Charity Engine Remote API. Use the "CharityEngine" batch computation provider for high-level submission of Wolfram Language jobs. »
Connecting & Authenticating
ServiceConnect["CharityEngine"] creates a connection to the Charity Engine Remote API.
Requests
ServiceExecute["CharityEngine","request",params] sends a request to the Charity Engine Remote API, using parameters params. The following give possible requests.
Create and Manipulate Jobs
"JobCreate" — create one or more jobs
| "AppName" | (required) | Docker image or application name to execute | |
| "CleanupFiles" | True | whether output directory should be cleaned | |
| "CommandLine" | (required) | command line string to execute | |
| "Copies" | 1 | number of identical copies to execute | |
| "EncryptedInputFiles" | False | whether input file contents are encrypted | |
| "EncryptedInputURLs" | False | whether input file URLs are encrypted | |
| "EncryptedOutputFiles" | False | whether output file contents should be encrypted | |
| "EncryptedOutputURLs" | False | whether output file URLs should be encrypted | |
| "EULAAccepted" | False | whether end-user license agreement of a proprietary application is accepted | |
| "InputFiles" | {} | list of input file URLs or hashes | |
| "InstanceType" | default from Charity Engine | instance type to use | |
| "PublicKey" | None | public key string to encrypt output file URLs and contents | |
| "Tag" | None | arbitrary job metadata string | |
| "Timeout" | max number of hours to run for | ||
| "UseOwnDevices" | False | whether to run on local devices instead of public network |
"JobList" — get a list of submitted jobs
| "Page" | 1 | page of 100 results to retrieve |
"JobStatus" — get the status of one or multiple jobs
"JobAbort" — terminate one or multiple running jobs
| "JobID" | (required) | a single job ID | |
| "JobIDs" | (required) | a list of job IDs |
Create and Manipulate Files
"FileExists" — check if a file exists on the server
| "FileHash" | (required) | MD5 hash of the file data |
"FileUpload" — upload a file to the server
| "Data" | (required) | file data as File or ByteArray | |
| "FileHash" | calculated from file data | MD5 hash of the file data |
Access and Manage System Information
"InstanceTypes" — list all instance types supported by the system
Examples
Basic Examples (3)
Create a connection by launching an authentication dialog:
charityengine = ServiceConnect["CharityEngine"]jobIDs = charityengine["JobCreate", "AppName" -> "docker:alpine", "CommandLine" -> "echo Hello Wolfram!"]Check the status of the submitted job:
charityengine["JobStatus", "JobID" -> jobIDs[[1]]]Upload a file to Charity Engine:
uploadedFile = ServiceExecute["CharityEngine", "FileUpload", "Data" -> File[FindFile["ExampleData/photo.jpg"]]]Submit a job using the uploaded file as input:
jobIDs = ServiceExecute["CharityEngine", "JobCreate", {
"AppName" -> "docker:v4tech/imagemagick",
"CommandLine" -> "convert /local/input/in.jpg -channel RGB -negate -wave 10x64 /local/output/out.jpg",
"InputFiles" -> <|"in.jpg" -> uploadedFile["URL"]|>
}]jobdata = ServiceExecute["CharityEngine", "JobStatus", "JobID" -> jobIDs[[1]]]jobdata["DefaultState", "OutputFiles", 1, "URL"]//ImportGet a list of currently available instance types:
ServiceExecute["CharityEngine", "InstanceTypes"]See Also
ServiceExecute ▪ ServiceConnect
Service Connections: AWS
Remote Batch Computation Providers: CharityEngine
Related Workflows
- Set Up the Charity Engine Batch Computation Provider
Related Workflows
▪