Job submission

On JuliaHub you can submit jobs, which are user-defined workloads that get allocated a dedicated compute capacity. For example, this includes running scripts in batch computations, cloud IDEs, interactive notebooks and so on. The functions and types here deal with starting up such jobs and apps. The functions to inspect running or finished jobs are documented separately.

A complete JuliaHub job workload is defined by the following configuration pieces:

  • Job configuration. This specifies the computation that gets run, and includes information such as the type of computation (batch script vs starting a GUI application), any arguments or Julia code that gets passed to the job etc.

    As of now, there are three general types of jobs that can be run on JuliaHub:

    Each of these categories are configured slightly differently, and are described in more detail below.

  • Compute configuration. This specifies the hardware and cluster topology that will be used to execute the job (such as the number of CPUs per node, whether there is a GPU present, the number of nodes), how the Julia processes are configured (e.g. single process per node vs process per cpu), and other low-level technical configuration.

  • Runtime parameters. These are various additional parameters that control how a job behaves. Currently, this is limited to passing environment variables to the jobs, overriding the job's name in the UI, and to various configuration options related to running interactive jobs.

In the JuliaHub.jl code, the first two categories are encapsulated by the AbstractJobConfig and ComputeConfig types. These two, together with the additional runtime parameters, make up a WorkloadConfig object that can be submitted to JuliaHub for executing with the submit_job function.

The following sections on this page explain the different aspects of job submission in more detail. See the guide on submitting batch jobs to see more practical examples of how to submit jobs.

Compute configuration

JuliaHub supports a predefined set of node configurations, each of which have a specific number of CPUs, memory, GPUs etc. A JuliaHub job must pick one of these node types to run on, although a distributed job can run across multiple instances of the same node type. A list of these node specifications can be obtained with the nodespecs function (returning a list of NodeSpec objects).

julia> JuliaHub.nodespecs()
9-element Vector{JuliaHub.NodeSpec}:
 JuliaHub.nodespec(#= m6: 3.5 GHz Intel Xeon Platinum 8375C, 0.17/hr =#; ncpu=2, memory=8, ngpu=false, exactmatch=true)
 JuliaHub.nodespec(#= r6: 3.5 GHz Intel Xeon Platinum 8375C, 0.22/hr =#; ncpu=2, memory=16, ngpu=false, exactmatch=true)
 JuliaHub.nodespec(#= m6: 3.5 GHz Intel Xeon Platinum 8375C, 0.33/hr =#; ncpu=4, memory=16, ngpu=false, exactmatch=true)
 JuliaHub.nodespec(#= r6: 3.5 GHz Intel Xeon Platinum 8375C, 0.42/hr =#; ncpu=4, memory=32, ngpu=false, exactmatch=true)
 JuliaHub.nodespec(#= m6: 3.5 GHz Intel Xeon Platinum 8375C, 0.65/hr =#; ncpu=8, memory=32, ngpu=false, exactmatch=true)
 JuliaHub.nodespec(#= r6: 3.5 GHz Intel Xeon Platinum 8375C, 1.3/hr =#; ncpu=8, memory=64, ngpu=false, exactmatch=true)
 JuliaHub.nodespec(#= m6: 3.5 GHz Intel Xeon Platinum 8375C, 2.4/hr =#; ncpu=32, memory=128, ngpu=false, exactmatch=true)
 JuliaHub.nodespec(#= p2: Intel Xeon E5-2686 v4 (Broadwell), 1.4/hr =#; ncpu=4, memory=61, ngpu=true, exactmatch=true)
 JuliaHub.nodespec(#= p3: Intel Xeon E5-2686 v4 (Broadwell), 4.5/hr =#; ncpu=8, memory=61, ngpu=true, exactmatch=true)

While you can manually index into the list returned by nodespecs, that is generally inconvenient. Instead, the nodespec function should be used to find a suitable node for a particular job.

julia> JuliaHub.nodespec(ncpu=2, memory=8)
Node: 3.5 GHz Intel Xeon Platinum 8375C
 - GPU: no
 - vCores: 2
 - Memory: 8 Gb
 - Price: 0.17 $/hr

By default, nodespec finds the smallest node that satisfies the specified requirements. However, it also supports the exactmatch argument, which can be use to find the exactly matching node configuration.

julia> JuliaHub.nodespec(ncpu=3, memory=5; exactmatch=true)
ERROR: InvalidRequestError: Unable to find a nodespec: ncpu=3 memory=5 gpu=false
Stacktrace:
 ...

julia> JuliaHub.nodespec(ncpu=3, memory=5)
Node: 3.5 GHz Intel Xeon Platinum 8375C
 - GPU: no
 - vCores: 4
 - Memory: 16 Gb
 - Price: 0.33 $/hr

By default, JuliaHub jobs run on a single node. However, for a distributed job, additional nodes can be allocated to a job by specifying the nnodes parameter. In that case, a Julia process is started on each node, and the additional nodes are linked to the main process via the Distributed module.

While by default only a single Julia process is started on each node, by setting the process_per_cpu parameter, multiple Julia processes are started on the same node. The processes are isolated from each other by running in separate containers, but they share the CPUs, GPUs, and most crucially, the memory.

See ComputeConfig and submit_job for more details on how exactly to set up this configuration.

Runtime configuration

The submit_job function accepts various additional parameters that control aspects of the job. See the function's docstring for more details.

ParameterDescription
namecan be used to override the name of the job shown in the UI
projectspecifies the JuliaHub project UUID that the job is associate with
timelimitsets the time limit after which the job gets killed
envenvironment variables set at runtime

As an example, to have an environment variable set while the job is running, you could call submit_job as follows:

JuliaHub.submit_job(
    JuliaHub.script"""
    @info "Extracting 'MY_PARAMETER'" get(ENV, "MY_PARAMETER", nothing)
    """,
    env = Dict("MY_PARAMETER" => "example value"),
    dryrun = true
)
JuliaHub.WorkloadConfig:
application:
  JuliaHub.BatchJob:
  code = """
  @info "Extracting 'MY_PARAMETER'" get(ENV, "MY_PARAMETER", nothing)
  """
  sha256(project_toml) = 93a83d60d4a9c6a3d1438259fd506929eaad296b7e112e886b305781b85cb85b
  sha256(manifest_toml) = 7f6a3052cad3e8097b148270b3350caaedc38034c123866b503450e77744966b
compute:
  JuliaHub.ComputeConfig
   Node: 3.5 GHz Intel Xeon Platinum 8375C
    - GPU: no
    - vCores: 2
    - Memory: 8 Gb
    - Price: 0.17 $/hr
   Process per node: true
   Number of nodes: 1
timelimit = 1 hour, 
env: 
  MY_PARAMETER: example value

Batch jobs

Batch jobs are Julia scripts with (optional) associated Julia package environments (Project.toml, Manifest.toml and/or Artifacts.toml) that run on the cluster non-interactively.

See also: @script_str, script, appbundle for more details, and the guide on submitting batch jobs for a tutorial.

Specifying the job image

JuliaHub batch jobs can run in various container images. Different JuliaHub products often have their own image tailored for the application (e.g. that come with custom sysimages to reduce load times).

The list of all images available to the user can be obtained with batchimages, and a specific one can be picked out with batchimage. The latter function is particularly useful when submitting jobs.

JuliaHub.submit_job(
    JuliaHub.BatchJob(
        JuliaHub.script"""
        using SpecialProductModule
        SpecialProductModule.run()
        """,
        image = JuliaHub.batchimage("specialproduct"),
    )
)

Default Applications

Experimental feature

Starting application jobs with JuliaHub.jl is considered to be experimental. The APIs are likely to change in future JuliaHub.jl version.

Default applications are the JuliaHub-built in applications (such as dashboards and IDEs), generally associated with specific JuliaHub products. Specific examples of default applications available to everyone include the Pluto notebooks and the Julia IDE.

The list of available applications can be accessed via the applications function, and specific applications can be picked out with application.

julia> apps = JuliaHub.applications()
7-element Vector{JuliaHub.AbstractJuliaHubApp}:
 JuliaHub.application(:default, "Linux Desktop")
 JuliaHub.application(:default, "Julia IDE")
 JuliaHub.application(:default, "Pluto")
 JuliaHub.application(:default, "Windows Workstation")
 JuliaHub.application(:package, "RegisteredPackageApp")
 JuliaHub.application(:package, "CustomDashboardApp")
 JuliaHub.application(:user, "ExampleApp.jl")

julia> JuliaHub.application(:default, "Pluto")
DefaultApp
 name: Pluto
 key: pluto

A JuliaHub job that launches an application can be started by passing the object returned by the application function to submit_job.

import JuliaHub # hide
JuliaHub.submit_job(
    JuliaHub.application(:default, "Pluto"),
    ncpu = 8, memory = 16,
)

External package applications

Experimental feature

Starting package application jobs with JuliaHub.jl is considered to be experimental. The APIs are likely to change in future JuliaHub.jl version.

Specially crafted Julia packages can also be launched as JuliaHub jobs. They are either automatically picked up from the packages registries served by the JuliaHub instance (PackageApp), or added by users themselves (UserApp) via a Git URL.

A package application must have a top-level package environment (i.e. it has a Project.toml the declares a name and a UUID), and it must have a entry script at bin/main.jl. When a package job starts, the package is added to an environment and bin/main.jl is called. Note that the bin/main.jl script does not have any access to any of the package dependencies.

The applications function can list all available packages (with filtering for user or registered). JuliaHub.application can be used to pick a package by name. It works for both registered packages

JuliaHub.submit_job(
    JuliaHub.application(:package, "RegisteredPackageApp"),
    ncpu = 4,
)

and for private, user applications

JuliaHub.submit_job(
    JuliaHub.application(:user, "ExampleApp.jl"),
    ncpu = 4,
    env = Dict("example_parameter" => "2")
)
Environment variables

Environment variables (i.e. env) are a common way to communicate options and settings to package applications.

Reference

JuliaHub.NodeSpecType
struct NodeSpec

Stores information about a compute node that can be allocated for JuliaHub jobs. The list of all available node specifications can be accessed with nodespecs, or specific ones searched with nodespec.

julia> JuliaHub.nodespec()
Node: 3.5 GHz Intel Xeon Platinum 8375C
 - GPU: no
 - vCores: 2
 - Memory: 8 Gb
 - Price: 0.17 $/hr

They can be used to contruct explicit compute configuration objects when submitting JuliaHub jobs.

See also: submit_job, ComputeConfig.

source
JuliaHub.nodespecsFunction
JuliaHub.nodespecs(; auth::Authentication) -> Vector{NodeSpec}

Query node specifications available on the current server, returning a list of NodeSpec objects.

source
JuliaHub.nodespecFunction
JuliaHub.nodespec(
    [nodes::Vector{NodeSpec}];
    ncpu::Integer=1, ngpu::Integer=false, memory::Integer=1,
    exactmatch::Bool=false, throw::Bool=true,
    [auth::Authentication]
) -> Union{NodeSpec, Nothing}

Finds the node matching the specified node parameters. Throws an InvalidRequestError if it is unable to find a node with the specific parameters. However, if throw is set to false, it will return nothing instead in that situation.

By default, it searches for the smallest node that has the at least the specified parameters (prioritizing GPU count, CPU count, and memory in this order when deciding). If exactmatch is set to true, it only returns a node specification if it can find one that matches the parameters exactly.

A list of nodes (e.g. from nodespecs) can also be passed, so that the function does not have to query the server for the list. When this method is used, it is not necessary to pass auth.

source
JuliaHub.BatchImageType
struct BatchImage

Represents an available JuliaHub batch job image. These can be passed to BatchJob to specify which underlying job image will be used for the job.

A list of available batch images can be accessed with batchimages and specific images can be constructed with batchimage.

No public constructors

Objects of this type should not be constructed explicitly. The contructor methods are not considered to be part of the public API.

See also: batchimages, batchimage, BatchJob, script, appbundle.

source
JuliaHub.batchimagesFunction
JuliaHub.batchimages([product::AbstractString]; [auth::Authentication]) -> Vector{BatchImage}

Return the list of all batch job images available to the currently authenticated user, as a list of BatchImage objects. These can be passed to BatchJob.

Optionally, by passing a product identifier, the list can be narrowed down to images available for that specific product.

Batch images on older instances

When using the package with an older JuliaHub instance (<= 6.1), the non-default batch images show up with @legacy as the product name. This indicates that the package is using an older API, and not that the images themselves are outdated.

See also: BatchImage, batchimage, BatchJob, script, appbundle.

source
JuliaHub.batchimageFunction
JuliaHub.batchimage(
    [product::AbstractString, [image::AbstractString]];
    throw::Bool=true, [auth::Authentication]
) -> BatchImage

Pick a product job batch image from the list of all batch image, returning a BatchImage object. If image is omitted, it will return the default image corresponding to product. If product is omitted as well, it will return the default image of the instance (generally the standard Julia batch image).

Will throw an InvalidRequestError if the specified image can not be found. If throw=false, it will return nothing instead in this situation.

Batch images on older instances

When using the package with an older JuliaHub instance (<= 6.1), the non-default batch images show up with @legacy as the product name. This indicates that the package is using an older API, and not that the images themselves are outdated.

See also: BatchImage, batchimages, BatchJob, script, appbundle.

source
JuliaHub.BatchJobType
struct BatchJob <: AbstractJobConfig

Represents the application configuration of a JuliaHub batch job. A batch job is defined by the following information:

  • The Julia code that is to be executed in the job.
  • Julia package environment (i.e. Project.toml, Manifest.toml) and other files, such as the appbundle.
  • The underlying batch job container image (see also batchimages), which defaults to the standard Julia image by default.

Instances of this types should normally not be constructed directly, and the following functions should be used instead:

  • script or @script_str: for submitting simple Julia scripts or code snippets
  • appbundle: for submitting more complex "appbundles" that include additional file, private or modified package dependencies etc.

Optional arguments

  • image :: Union{BatchImage, Nothing}: can be used to specify which product's batch job image will be used when running the job, by passing the appropriate BatchImage object (see also: batchimage and batchimages). If set to nothing (the default), the job runs with the default Julia image.

  • sysimage :: Bool: if set to true, requests that a system image is built from the job's Manifest.toml file before starting the job. Defaults to false.

JuliaHub compatibility

The sysimage = true option requires JuliaHub 6.3 to have an effect. When running against older JuliaHub versions, it does not have an effect.

Constructors

BatchJob(::BatchJob; [image::BatchImage], [sysimage::Bool]) -> BatchJob

Construct a BatchJob, but override some of the optional arguments documented above. When the argument is omitted, the value from the underlying BatchJob object is used. This is the only constructor that is part of the public API.

This method is particularly useful when used in in combination with the @script_str string macro, to be able to specify the job image or trigger a sysimage build. For example, the following snippet will set a different batch image for the script-type job:

JuliaHub.BatchJob(
    JuliaHub.script"""
    @info "Hello World"
    """,
    image = JuliaHub.batchimage("...")
)
source
JuliaHub.scriptFunction
JuliaHub.script(...) -> BatchJob

Constructs the configuration for a script-type batch job, returning the respective BatchJob object that can then be passed to submit_job. A script-type batch job is defined by the following:

  • A user-provided Julia script that gets executed on the server. Note that no validation of the input code is done.

  • An optional Julia package environment (e.g. Project.toml, Manifest.toml and Artifacts.toml). If any of the TOML files are provided, they must parse as valid TOML files, but no further validation is done client-side.

    If the manifest is not provided, the project environment must be instantiated from scratch, generally pulling in the latest versions of all the dependencies (although [compat] sections are honored).

    It is also fine to omit the project file, and just provide the manifest, and the environment defined by the manifest still gets instantiated. If both are omitted, the job runs in an empty environment.

  • A JuliaHub job image, which determines the container environment that will be used to execute the code in (see batchimage, batchimages, BatchImage). If omitted, the default Julia image is used.

See also the @script_str string macro to more easily submit simple scripts that are defined in code.

Methods

script(
    scriptfile::AbstractString;
    [project_directory::AbstractString], [image::BatchImage], [sysimage::Bool]
) -> BatchJob

Constructs a script-type batch job configuration the will execute the code in scriptfile. Optionally, a path to a project environment directory can be passed via project_directory, which will be searched for the environment TOML files, and a job image can be specified via image.

script(;
    code::AbstractString,
    [project::AbstractString], [manifest::AbstractString], [artifacts::AbstractString],
    [image::BatchImage], [sysimage::Bool]
) -> BatchJob

A lower-level method that can be used to construct the script-type BatchJob configuration directly in memory (i.e. without having to write out intermediate files).

The code keyword argument is mandatory and will specify contents of the Julia script that gets executed on the server. The Julia project environment can be specified by passing the contents of the TOML files via the corresponding arguments (project, manifest, artifacts). The job image can be specified via image.

Optional arguments

See BatchJob for a more thorough description of the optional arguments.

source
JuliaHub.@script_strMacro
JuliaHub.@script_str -> JuliaHub.BatchJob

A string macro to conveniently construct a script-type batch job configuration (BatchJob) that can be submitted as a JuliaHub job.

script = JuliaHub.script"""
@info "Hello World!"
"""

This allows for an easy submission of simple single-script jobs to JuliaHub:

JuliaHub.submit_job(
    JuliaHub.script"""
    @info "Hello World!"
    """
)

By default, the macro picks up the currently active Julia project environment (via Base.active_project()), and attaches the environment .toml files to the script. To disable this, you can call the macro with the noenv suffix, e.g.

script = JuliaHub.script"""
@info "Hello World!"
"""noenv

However, if your local environment has development dependencies, you likely need to use an appbundle instead (see appbundle).

Using a different job image

There is no way to specify the job image with the string macro, and it will use the default Julia image. To use a different job image, you should either use the script function, either by fully constructing the batch job configuration with the keyword arguments, or by using the BatchJob(::BatchJob; image=...) method.

JuliaHub.submit_job(
    JuliaHub.BatchJob(
        JuliaHub.script"""
        @info "Hello World!"
        """,
        image = JuliaHub.batchimage(...)
    )
)

You can also use this pattern to set the sysimage option.

source
JuliaHub.appbundleFunction
JuliaHub.appbundle(
    directory::AbstractString, codefile::AbstractString;
    [image::BatchImage], [sysimage::Bool]
) -> BatchJob
JuliaHub.appbundle(
    directory::AbstractString;
    code::AbstractString, [image::BatchImage], [sysimage::Bool]
) -> BatchJob

Construct an appbundle-type JuliaHub batch job configuration. An appbundle is a directory containing a Julia environment that is bundled up, uploaded to JuliaHub, and then unpacked and instantiated as the job starts.

The code that gets executed is read from codefile, which should be a path to Julia source file relative to directory.

JuliaHub.appbundle(@__DIR__, "my-script.jl")

Alternatively, if codefile is omitted, the code can be provided as a string via the code keyword argument.

JuliaHub.AppBundle(
    @__DIR__,
    code = """
    @show ENV
    """
)

See BatchJob for a description of the optional arguments.

Extended help

The following should be kept in mind about how appbundles are handled:

  • The bundler looks for a Julia environment (i.e. Project.toml and/or Manifest.toml files) at the root of the directory. If the environment does not exist (i.e. the files are missing), the missing files are created. If the manifest is missing, then the environment is re-instantiated from scratch based on the contents of Project.toml. The generated files will also be left in the user-provided directory directory.

  • Development dependencies of the environment (i.e. packages added with pkg> develop or Pkg.develop()) are also bundled up into the archive that gets submitted to JuliaHub (including any current, uncommitted changes). Registered packages are installed via the package manager via the standard environment instantiation, and their source code is not included in the bundle directly.

  • When the JuliaHub job starts, the bundle is unpacked and the job's starting working directory is set to the appbundle/ directory, and you can e.g. load the data from those files with just read("my-data.txt", String).

    Note that @__DIR__ points elsewhere and, relatedly, include in the main script should be used with an absolute path (e.g. include(joinpath(pwd(), "my-julia-file.jl"))).

    JuliaHub 6.2 and older

    On some older JuliaHub versions (6.2 and older), the working directory was set to the parent directory of appbundle/, and so it was necessary to do joinpath("appbundle", "mydata.dat") to load the code.

source
JuliaHub.ComputeConfigType
struct ComputeConfig

This type encapsulates the configuration of a jobs's compute cluster, including the hardware configuration and the cluster topology.

See also: submit_job.

Constructors

JuliaHub.ComputeConfig(
    node::NodeSpec;
    nnodes::Integer = 1,
    process_per_node::Bool = true,
    elastic::Bool = false,
)
  • node: a NodeSpec object that specifies the hardware of a single node.

  • nnodes::Union{Integer, Tuple{Integer, Integer}} = 1: specifies the number of nodes of type node that will be allocated. Alternatively, a two-integer tuple can also be passed, where the first value specifies the minimum number of nodes required to start a job. By default, a single-node job is started.

  • process_per_node::Bool = true: if true, there will only be a single Julia process per node, and the total number of Julia processes will be nnodes. If set to false, however, each core on each node will be allocated a separate Julia process (running in an isolated container on the same node), and so the total number of Julia processes will be nnodes × ncpu, and it will essentially always be a multi-process job.

  • elastic::Bool = false: if set, the job will be started in an elastic cluster mode. In this case, a minimum number of nnodes must not be passed.

source
JuliaHub.submit_jobFunction
JuliaHub.submit_job(
    app::Union{AbstractJuliaHubApp, AbstractJobConfig},
    [compute::ComputeConfig];
    # Compute keyword arguments
    ncpu::Integer = 1, ngpu::Integer = 0, memory::Integer = 1,
    nnodes::Integer = 1, minimum_nnodes::Union{Integer,Nothing} = nothing,
    elastic::Bool = false,
    process_per_node::Bool = true,
    # Runtime configuration keyword arguments
    [alias::AbstractString], [env], [project::Union{UUID, AbstractString}],
    timelimit::Limit = Hour(1),
    # General keyword arguments
    dryrun::Bool = false,
    [auth :: Authentication]
) -> Job

Submits the specified application config app as a job to JuliaHub. Returns a Job object corresponding to the submitted job.

Compute arguments. If compute is passed, the compute keyword arguments can not be passed. If compute is not passed, the following arguments can be used to specify the compute configration via keyword arguments:

  • ncpu, ngpu and memory are used to pick a node type that will be used to run the job. The node type will be a minimum one that satisfies the constraints, but may have more compute resources than specified by the arguments (it corresponds to the exactmatch = false case of nodespec).

  • nnodes, minimum_nnodes, process_per_node, and elastic specify the corresponding arguments in ComputeConfig.

Runtime configuration. These are used to set the Runtime configuration of the job.

  • alias :: Union{AbstractString, Nothing}: can be used to override the name of the job that gets displayed in the UI. Passing nothing is equivalent to omitting the argument.

  • timelimit :: Limit: sets the job's time limit (see Limit for valid values)

  • env: an iterable of key-value pairs that can be used to set environment variable that get set before, the job code gets executed.

  • project :: Union{UUID, AbstractString, Nothing}: the UUID of the project that the job will be associated with. If a string is passed, it must parse as a valid UUID. Passing nothing is equivalent to omitting the argument.

General arguments.

  • auth :: Authentication: optional authentication object (see the authentication section for more information)

  • dryrun :: Bool: if set to true, submit_job does not actually submit the job, but instead returns a WorkloadConfig object, which can be used to inspect the configuration that would be submitted.

    The WorkloadConfig object can then be submitted to JuliaHub with the additional submit_job method:

    JuliaHub.submit_job(::WorkloadConfig; [auth::Authentication])
JuliaHub compatibility

The timelimit = JuliaHub.Unlimited() argument requires JuliaHub 6.3+.

source
JuliaHub.LimitType
JuliaHub.Limit

Type-constraint on JuliaHub job timelimit arguments in submit_job.

The job time limit can either be a time period (an instance of Dates.Period), an Integer, (interpreted as the number of hours), or JuliaHub.Unlimited().

Only an integer number of hours are accepted by JuliaHub, and fractional hours from get rounded up to the next full integer number of hours (e.g. Dates.Minute(90) will be interpreted as 2 hours).

source
JuliaHub.UnlimitedType
struct Unlimited

An instance of this type can be passed as the [timelimit] option to submit_job to start jobs that run indefinitely, until killed manually.

JuliaHub.submit_job(..., timelimit = JuliaHub.Unlimited())
source
JuliaHub.WorkloadConfigType
struct WorkloadConfig

Represents a full job configuration, including the application, compute and runtime configuration.

Instances of this type can be constructed by passing dryrun = true to submit_job, and can also be directly submitted to JuliaHub with the same function.

source

Experimental APIs

Experimental features

Starting application jobs with JuliaHub.jl is considered to be experimental. The APIs are likely to change in future JuliaHub.jl version.

JuliaHub.AbstractJuliaHubAppType
abstract type AbstractJuliaHubApp

Abstract supertype for JuliaHub applications object types.

Experimental API

Applications-related APIs are experimental, and may be changed or removed without notice.

source
JuliaHub.applicationsFunction
JuliaHub.applications([category::Symbol]; [auth::Authentication]) -> Vector{AbstractJuliaHubApp}

Returns the list of applications enabled for the authenticated user, optionally in the specified category only. Returns a vector of AbstractJuliaHubApp instances.

julia> JuliaHub.applications()
7-element Vector{JuliaHub.AbstractJuliaHubApp}:
 JuliaHub.application(:default, "Linux Desktop")
 JuliaHub.application(:default, "Julia IDE")
 JuliaHub.application(:default, "Pluto")
 JuliaHub.application(:default, "Windows Workstation")
 JuliaHub.application(:package, "RegisteredPackageApp")
 JuliaHub.application(:package, "CustomDashboardApp")
 JuliaHub.application(:user, "ExampleApp.jl")

julia> JuliaHub.applications(:default)
4-element Vector{JuliaHub.DefaultApp}:
 JuliaHub.application(:default, "Linux Desktop")
 JuliaHub.application(:default, "Julia IDE")
 JuliaHub.application(:default, "Pluto")
 JuliaHub.application(:default, "Windows Workstation")

julia> JuliaHub.applications(:package)
2-element Vector{JuliaHub.PackageApp}:
 JuliaHub.application(:package, "RegisteredPackageApp")
 JuliaHub.application(:package, "CustomDashboardApp")

julia> JuliaHub.applications(:user)
1-element Vector{JuliaHub.UserApp}:
 JuliaHub.application(:user, "ExampleApp.jl")
Experimental API

Applications-related APIs are experimental, and may be changed or removed without notice.

source
JuliaHub.applicationFunction
JuliaHub.application(
    category::Symbol, name::AbstractString;
    throw::Bool=true, [auth::Authentication]
) -> AbstractJuliaHubApp

Returns the application corresponding to name from the specified category of applications. Will throw an InvalidRequestError if the application can't be found, or returns nothing in this situation if throw=false is passed.

category specifies the application category and must be one of: :default, :package, or :user. This is necessary to disambiguate apps with the same name in the different categories.

See also: applications.

Examples

julia> JuliaHub.applications()
7-element Vector{JuliaHub.AbstractJuliaHubApp}:
 JuliaHub.application(:default, "Linux Desktop")
 JuliaHub.application(:default, "Julia IDE")
 JuliaHub.application(:default, "Pluto")
 JuliaHub.application(:default, "Windows Workstation")
 JuliaHub.application(:package, "RegisteredPackageApp")
 JuliaHub.application(:package, "CustomDashboardApp")
 JuliaHub.application(:user, "ExampleApp.jl")
Experimental API

Applications-related APIs are experimental, and may be changed or removed without notice.

source
JuliaHub.DefaultAppType
struct DefaultApp <: AbstractJuliaHubApp

Represents a default JuliaHub instance application, and they can be started as jobs with submit_job.

The list of available applications can be accessed via the applications function, and specific applications can be picked out with application.

julia> apps = JuliaHub.applications(:default)
4-element Vector{JuliaHub.DefaultApp}:
 JuliaHub.application(:default, "Linux Desktop")
 JuliaHub.application(:default, "Julia IDE")
 JuliaHub.application(:default, "Pluto")
 JuliaHub.application(:default, "Windows Workstation")

julia> JuliaHub.application(:default, "Pluto")
DefaultApp
 name: Pluto
 key: pluto
Experimental API

Applications-related APIs are experimental, and may be changed or removed without notice.

source
JuliaHub.PackageAppType
struct PackageApp <: AbstractJuliaHubApp

Represents a JuliaHub package application that is available in one of the instance's package registries. These packages can be started as JuliaHub jobs with submit_job.

The list of available applications can be accessed via the applications function, and specific applications can be picked out with application.

julia> apps = JuliaHub.applications(:package)
2-element Vector{JuliaHub.PackageApp}:
 JuliaHub.application(:package, "RegisteredPackageApp")
 JuliaHub.application(:package, "CustomDashboardApp")

julia> JuliaHub.application(:package, "RegisteredPackageApp")
PackageApp
 name: RegisteredPackageApp
 uuid: db8b4d46-bfad-4aa5-a5f8-40df1e9542e5
 registry: General (23338594-aafe-5451-b93e-139f81909106)

See also: help.juliahub.com on applications

Experimental API

Applications-related APIs are experimental, and may be changed or removed without notice.

source
JuliaHub.UserAppType
struct UserApp <: AbstractJuliaHubApp

Represents a private application that has been added to the user account via a Git repository. These applications can be started as JuliaHub jobs with submit_job.

The list of available applications can be accessed via the applications function, and specific applications can be picked out with application.

julia> apps = JuliaHub.applications(:user)
1-element Vector{JuliaHub.UserApp}:
 JuliaHub.application(:user, "ExampleApp.jl")

julia> JuliaHub.application(:user, "ExampleApp.jl")
UserApp
 name: ExampleApp.jl
 repository: https://github.com/JuliaHubExampleOrg/ExampleApp.jl

See also: help.juliahub.com on applications

Experimental API

Applications-related APIs are experimental, and may be changed or removed without notice.

source
JuliaHub.PackageJobType
struct PackageJob <: AbstractJobConfig

AbstractJobConfig that wraps a PackageApp or UserApp. This is primarily used internally and should rarely be constructed explicitly.

Constructors

JuliaHub.PackageJob(app::Union{JuliaHub.PackageApp,JuliaHub.UserApp}; [sysimage::Bool = false])

Can be used to construct a PackageApp or UserApp based job, but allows for some job parameters to be overridden. Currently, only support the enabling of a system image based job by setting sysimage = true.

julia> app = JuliaHub.application(:package, "RegisteredPackageApp")
PackageApp
 name: RegisteredPackageApp
 uuid: db8b4d46-bfad-4aa5-a5f8-40df1e9542e5
 registry: General (23338594-aafe-5451-b93e-139f81909106)

julia> JuliaHub.submit_job(JuliaHub.PackageJob(app; sysimage = true))
JuliaHub.Job: jr-xf4tslavut (Submitted)
 submitted: 2023-03-15T07:56:50.974+00:00
 started:   2023-03-15T07:56:51.251+00:00
 finished:  2023-03-15T07:56:59.000+00:00
source

Index