Giter Club home page Giter Club logo

paperspace-node's Issues

contribution: Homebrew paperspace CLI formula

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

paperspace command not found on npm install

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?

screen shot 2018-10-28 at 1 08 30 pm

screen shot 2018-10-28 at 1 16 05 pm

screen shot 2018-10-28 at 1 17 20 pm

Is paperspace-node supposed to work in-browser?

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:

  • [lib/projectConfig.js] uses fs.existsSync which doesn't appear to be available.
  • [lib/method.js] uses readlineSync only when global.paperspace_cli is set, but always imports it.
  • [lib/jobs/create.js] uses 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?

Expose ports and create public IP

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!

Paperspace Startup Script Not Working

`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.

Error while trying to create script

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)

NODE_ENV mismatch

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

Latest version has vulnerable dependency

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.