Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Commit

Permalink
release_v0.1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
exdx committed Feb 11, 2019
1 parent b339932 commit 4d840f5
Show file tree
Hide file tree
Showing 59 changed files with 302 additions and 68 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Paperspace API (v0.1.12)
# Paperspace API (v0.1.13)

![image](https://user-images.githubusercontent.com/585865/27562775-26b8acc6-5a9c-11e7-8270-2b80ca895bc5.png)

Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="jobs.h


<section class="readme">
<article><h1 id="paperspace-api-v0-1-12-">Paperspace API (v0.1.12)</h1>
<article><h1 id="paperspace-api-v0-1-13-">Paperspace API (v0.1.13)</h1>
<p><img src="https://user-images.githubusercontent.com/585865/27562775-26b8acc6-5a9c-11e7-8270-2b80ca895bc5.png" alt="image"></p>
<hr>
<p><strong>Heads up! This project is under construction!</strong> We welcome your bug reports and suggestions via GitHub Issues!</p>
Expand Down Expand Up @@ -163,7 +163,7 @@ <h2 id="copyright">Copyright</h2>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Jan 14 2019 10:51:10 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
204 changes: 201 additions & 3 deletions docs/jobs.html
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@ <h6>Properties</h6>



<td class="description last"><p>A required reference to a docker image in a public or private docker registry, or a container name provided by Paperspace. Docker image repository references must be in lowercase and may include a tag and a hostname prefix followed by a slash; if ommitted the hostname defaults to that of the public Docker Hub registry. An example docker image reference: 'docker.io/mynamespace/myimage:mytag'. A container name may be mixed case. (Designated container names are currently only provided as part of various Gradient tutorials and samples.)</p></td>
<td class="description last"><p>A reference to a docker image in a public or private docker registry, or a container name provided by Paperspace. Docker image repository references must be in lowercase and may include a tag and a hostname prefix followed by a slash; if ommitted the hostname defaults to that of the public Docker Hub registry. An example docker image reference: 'docker.io/mynamespace/myimage:mytag'. A container name may be mixed case. (Designated container names are currently only provided as part of various Gradient tutorials and samples.)</p></td>
</tr>


Expand Down Expand Up @@ -2212,7 +2212,205 @@ <h6>Properties</h6>



<td class="description last"><p>Optional; if included job will be sent to a preemptible VM only. Defaults to false.</p></td>
<td class="description last"><p>Optional; if true job will be sent to a preemptible VM only. Defaults to false.</p></td>
</tr>



<tr>

<td class="name"><code>useDockerfile</code></td>


<td class="type">


<span class="param-type">boolean</span>



</td>


<td class="attributes">

&lt;optional><br>





</td>




<td class="description last"><p>Optional; if true the job will use the Dockerfile provided in the workspace to build a docker image and optionally run the resulting image as a container</p></td>
</tr>



<tr>

<td class="name"><code>buildOnly</code></td>


<td class="type">


<span class="param-type">boolean</span>



</td>


<td class="attributes">

&lt;optional><br>





</td>




<td class="description last"><p>Optional; if this option is selected the job will build the Dockerfile and push to a selected remote registry only, without actually running the container. A registry target must be provided.</p></td>
</tr>



<tr>

<td class="name"><code>registryTarget</code></td>


<td class="type">


<span class="param-type">string</span>



</td>


<td class="attributes">

&lt;optional><br>





</td>




<td class="description last"><p>Optional; a location to push docker images built from a Dockerfile. Must be included with a buildOnly flag. If useDockerfile is true and registryTarget is false the built container will be run but not pushed to a remote registry.</p></td>
</tr>



<tr>

<td class="name"><code>registryTargetUsername</code></td>


<td class="type">


<span class="param-type">string</span>



</td>


<td class="attributes">

&lt;optional><br>





</td>




<td class="description last"><p>Optional; username credential for remote registry target</p></td>
</tr>



<tr>

<td class="name"><code>registryTargetPassword</code></td>


<td class="type">


<span class="param-type">string</span>



</td>


<td class="attributes">

&lt;optional><br>





</td>




<td class="description last"><p>Optional; password credential for remote registry target</p></td>
</tr>



<tr>

<td class="name"><code>relDockerfilePath</code></td>


<td class="type">


<span class="param-type">string</span>



</td>


<td class="attributes">

&lt;optional><br>





</td>




<td class="description last"><p>Optional; relative location of Dockefile in the workspace. Defaults to the top level &quot;./Dockerfile&quot; if not specified.</p></td>
</tr>


Expand Down Expand Up @@ -4766,7 +4964,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Jan 14 2019 10:51:10 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jobs_artifactsDestroy.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h1 class="page-title">jobs/artifactsDestroy.js</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Jan 14 2019 10:51:10 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jobs_artifactsGet.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ <h1 class="page-title">jobs/artifactsGet.js</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Jan 14 2019 10:51:10 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jobs_artifactsList.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ <h1 class="page-title">jobs/artifactsList.js</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Jan 14 2019 10:51:10 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jobs_clone.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ <h1 class="page-title">jobs/clone.js</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Jan 14 2019 10:51:10 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
30 changes: 21 additions & 9 deletions docs/jobs_create.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ <h1 class="page-title">jobs/create.js</h1>
* @method create
* @description Create a new Paperspace job, and tail its log output if run at the command line. To disable the tailing behavior specify '--tail false'. Note: if a project is not defined for the current working directory, and you are running in command line mode, a project configuration settings file will be created. Use '--init false' or specify '--project [projectname]' to override this behavior.
* @param {object} params - Job creation parameters
* @param {string} params.container - A required reference to a docker image in a public or private docker registry, or a container name provided by Paperspace. Docker image repository references must be in lowercase and may include a tag and a hostname prefix followed by a slash; if ommitted the hostname defaults to that of the public Docker Hub registry. An example docker image reference: 'docker.io/mynamespace/myimage:mytag'. A container name may be mixed case. (Designated container names are currently only provided as part of various Gradient tutorials and samples.)
* @param {string} params.container - A reference to a docker image in a public or private docker registry, or a container name provided by Paperspace. Docker image repository references must be in lowercase and may include a tag and a hostname prefix followed by a slash; if ommitted the hostname defaults to that of the public Docker Hub registry. An example docker image reference: 'docker.io/mynamespace/myimage:mytag'. A container name may be mixed case. (Designated container names are currently only provided as part of various Gradient tutorials and samples.)
* @param {string} [params.cluster] - An optional cluster name of a cluster to run the job on. Only one of cluster or clusterId may be specified.
* @param {string} [params.clusterId] - An optional cluster id of a cluster to run the job on. Only one of cluster or clusterId may be specified.
* @param {string} [params.machineType] - An optional machine type to run the job on: either 'GPU+', 'P4000', 'P5000', 'P6000', 'V100', 'K80', 'P100', 'TPU', or 'GradientNode'.&lt;p>Defaults to 'K80'. &lt;P>Note: the 'K80', 'P100', and 'TPU' machineTypes run on Google Cloud Platform (GCP). The other machineTypes run on the Paperspace Cloud. Google Cloud platform and Paperspace Cloud have distict Job Storage spaces; Job storage is not currently shared between these two cloud environments.
Expand All @@ -81,7 +81,13 @@ <h1 class="page-title">jobs/create.js</h1>
* @param {number} [params.nodeAttrs] - Optional; a JSON expression describing the node attributes for a compatible GradientNode machine to run this job. See the Gradient-Node documentation for more info.
* @param {boolean} [params.tail] - Optional; defaults to true in command line mode only. Specify false to disable automatic tailing.
* @param {boolean} [params.json] - Optional; if true, do not write progress to standard out. '--json' with no value is equivalent to true.
* @param {boolean} [params.isPreemptible] - Optional; if included job will be sent to a preemptible VM only. Defaults to false.
* @param {boolean} [params.isPreemptible] - Optional; if true job will be sent to a preemptible VM only. Defaults to false.
* @param {boolean} [params.useDockerfile] - Optional; if true the job will use the Dockerfile provided in the workspace to build a docker image and optionally run the resulting image as a container
* @param {boolean} [params.buildOnly] - Optional; if this option is selected the job will build the Dockerfile and push to a selected remote registry only, without actually running the container. A registry target must be provided.
* @param {string} [params.registryTarget] - Optional; a location to push docker images built from a Dockerfile. Must be included with a buildOnly flag. If useDockerfile is true and registryTarget is false the built container will be run but not pushed to a remote registry.
* @param {string} [params.registryTargetUsername] - Optional; username credential for remote registry target
* @param {string} [params.registryTargetPassword] - Optional; password credential for remote registry target
* @param {string} [params.relDockerfilePath] - Optional; relative location of Dockefile in the workspace. Defaults to the top level "./Dockerfile" if not specified.
* @param {function} cb - Node-style error-first callback function
* @returns {object} job - The created job JSON object
* @example
Expand Down Expand Up @@ -229,11 +235,20 @@ <h1 class="page-title">jobs/create.js</h1>
delete params.tail;
}

if (params.useDockerfile &amp;&amp; !params.buildOnly &amp;&amp; !params.command) {
return ifCliPrintErrorOnly(new Error('Missing required parameter: --command. Use the buildOnly flag or pass a command to execute against the container.'));
} else if (params.useDockerfile &amp;&amp; params.buildOnly) {
params.command = null
} else if (params.command) {
params.command = Buffer.from(params.command).toString('base64');
} else {
return ifCliPrintErrorOnly(new Error('Missing required parameter: --command'));
}

// XXX TODO trim leading/trailing spaces from input paths
// XXX TODO whitelist git services
// XXX TODO convert to gzip
// XXX TODO stream compress

var cwd = process.cwd();
if (!params.project &amp;&amp; !params.projectId) {
// default to name of project in .ps_project/config.json or name of current directory
Expand Down Expand Up @@ -271,7 +286,7 @@ <h1 class="page-title">jobs/create.js</h1>

projectConfig.setMachineType(params.project, params.machineType);

projectConfig.setContainer(params.project, params.container);
projectConfig.setContainer(params.project, params.container, params.useDockerfile);

projectConfig.setCommand(params.project, params.command);

Expand All @@ -281,7 +296,7 @@ <h1 class="page-title">jobs/create.js</h1>

projectConfig.setCluster(params.project, params.cluster);

if (!params.container) return ifCliPrintErrorOnly(new Error('Missing required parameter `container`'));
if (!params.container &amp;&amp; !params.useDockerfile) return ifCliPrintErrorOnly(new Error('Missing required parameter `container`'));

if (!params.workspace) params.workspace = cwd;

Expand Down Expand Up @@ -548,9 +563,6 @@ <h1 class="page-title">jobs/create.js</h1>
name: 'create',
method: 'post',
route: '/jobs/createJob',
requires: {
container: 'string',
},
file: 'workspace',
returns: {},
});
Expand All @@ -568,7 +580,7 @@ <h1 class="page-title">jobs/create.js</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Jan 14 2019 10:51:10 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jobs_destroy.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ <h1 class="page-title">jobs/destroy.js</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Jan 14 2019 10:51:10 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jobs_index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ <h1 class="page-title">jobs/index.js</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Jan 14 2019 10:51:10 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jobs_list.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ <h1 class="page-title">jobs/list.js</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Jan 14 2019 10:51:10 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
Loading

0 comments on commit 4d840f5

Please sign in to comment.