paperspace / paperspace-node Goto Github PK
View Code? Open in Web Editor NEWPaperspace API for node.js
Home Page: https://www.paperspace.com/core
License: ISC License
Paperspace API for node.js
Home Page: https://www.paperspace.com/core
License: ISC License
Although the master was modified to include the latest dependencies, there was no new release since, making the most recent version vulnerable:
https://registry.npmjs.org/paperspace-node/-/paperspace-node-0.1.17.tgz
To install and upgrade (or uninstall) the Paperspace CLI binary on macOS, I have made a Homebrew (mac package manager) tap and formula "paperspace-cli":
https://github.com/itsayellow/homebrew-paperspace
I would be happy to share with a wider community, so if you want to put this in your documentation, it would be much appreciated.
I tried to get the Homebrew organization to add the paperspace-cli formula to homebrew-core, but it was judged "not notable enough": Homebrew/homebrew-core#38536
Hi - I'm leading a course on machine learning and have successfully installed paperspace on my own machine, but I need to test student access on the school's laptops, and cannot get the cli working. Due to security restraints, I can only do an npm install paperspace-node
(no global, no pip, and the binary just downloads as a text document that I cannot execute).
But after successful npm init, npm install, if I attempt to run paperspace ...
anything, I get command not found paperspace
. Would this be a security constraint? Or a difference between a global install and a local that means I need to do something different to invoke the CLI?
Hey,
are jobs here in the repo the jobs described here: https://docs.paperspace.com/gradient/explore-train-deploy/workflows/workflow-spec#jobs or can I imagine them more like an AWS lambda with GPUs? I searched the paperspace.com website but was unable to find some business description about those.
Based on the Paperspace API docs
JavaScript API client (for Node.js and web browsers)
I expected that using the paperspace-node module (via ps_promise in my case) would work in a create-react-app-bootstrapped application.
However, I've hit a few problem, and they look suspiciously like assumptions of running on a node.js stack:
fs.existsSync
which doesn't appear to be available.readlineSync
only when global.paperspace_cli
is set, but always imports it.archiver
which eventually hits fs.ReadStream
being missing.isaacs/node-graceful-fs#121 (comment) suggests that last one might be a bug in graceful-fs, but perhaps it's a problem somewhere else.
Before I sink much more time into trying to fix these things properly, is this even a valid-use case? Is the 'web browsers' mention on the page an oversight, or is there something I need to fix about my environment to make this work?
Following a brief discussion with @dte, having a method in the API to expose ports will be useful. I'm creating a public server and need to expose specific ports when the machine is started. I'm using sudo ufw allow 33100
, but it would be nice to have them programmatically setup up when booting the machine.
Also, having a way to enable or set up the public address will be nice too!
Hey,
I want to use resource delegation access token but I cannot find how to use them when I have already created one.
`var paperspace_node = require("paperspace-node");
var paperspace = paperspace_node({
apiKey: API_KEY, // <- paste your api key here
});
paperspace.scripts.create
(
{
scriptName: "Server Startup Script",
scriptFile: "/home/paperspace/game-server/linux-build/startup.sh",
scriptDescription: "Runs startup.sh",
machineId: MACHINE_ID
},
function (err, res) {
// handle error or result
console.log(res);
console.log(err);
}
);`
This is my node script that makes a paperspace script when launched. The script is confirmed to be created because when I do "paperspace scripts list", it exists. My problem is when I restart the machine. The startup script that has been created won't launch. I don't really know why it won't work. I followed the documents step by step.
Hi,
I'm trying to create script on my machine. According to https://paperspace.github.io/paperspace-node/scripts.html#.create I've created sample code
paperspace.scripts.create({
scriptName: 'Run docker at start',
scriptFile: 'startup.sh',
scriptDescription: 'A startup script', // optional
isEnabled: true, // optional
runOnce: false, // optional
machineId: machineId, // optional
}, function(err, res) {
console.log(res);
});
and what I'm getting is
{ error:
{ name: 'Error',
status: 404,
message: 'script not uploded - temporary' } }
Could you explain this, please?
Of course other requests are working ( e.g. I can start and stop machines using paperspace-node)
Hello there!
I'm developing an app with electron and I have my own custom environment variables.
Running any request to the paperspace api with my own NODE_ENV creates an error in line 14 of client.js
:
var nodeEnv = processEnv.NODE_ENV;
var config = configInfo[nodeEnv || 'production'];
Throwing this:
TypeError: Cannot read property 'host' of undefined
because I don't have a custom .host
variable in my environment variable.
I got to pass the error by specifying production always:
var config = configInfo['production'];
I'm not sure if this is the intended behavior. If not, I can submit a PR to fix this
as per npm audit
using [email protected]
yargs-parser <=5.0.0
Severity: moderate
yargs-parser Vulnerable to Prototype Pollution - https://github.com/advisories/GHSA-p9pc-299p-vxgp
No fix available
node_modules/paperspace-node/node_modules/yargs-parser
yargs 4.0.0-alpha1 - 7.0.0-alpha.3 || 7.1.1
Depends on vulnerable versions of yargs-parser
node_modules/paperspace-node/node_modules/yargs
paperspace-node *
Depends on vulnerable versions of yargs
node_modules/paperspace-node
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.