Code Monkey home page Code Monkey logo

Comments (8)

lefnire avatar lefnire commented on May 28, 2024

Would creating /storage/config.json be a bad idea security-wise?

from gradient-cli.

mikuts avatar mikuts commented on May 28, 2024

hello @lefnire thanks for reporting this - we will take a look and push out change at the API, the env variables are getting passed along for jobs but not being returned as part of the object.

in the interim you can use experiments (gradient experiments create), which is a very similar interface as jobs with some additional syntax around /modelPath) - this will save and register your model in the paperspace system for easy deployment.

for security i wouldn't leave the /storage/config.json but set secrets at the project/cluster level and inject them in as experiment_env variables {db_read_creds: secret:DB_READ_CREDS)

from gradient-cli.

lefnire avatar lefnire commented on May 28, 2024

Thanks for the reply. The other reason I believe job_env wasn't passing is that my code cascades config.example.json -> config.json -> os.environ[x]. The 3rd was being printed as skipped in all the vars I passed. Is that we're they're accessed, as env-vars like export X=1 / os.environ['X']?

Thanks for the heads up on secrets, I'll look into that. Is there a definite security risk in /storage, like each user's /storage is publicly accessible, or is it more about good/bad practice? (Wondering if I need to do damage control now)

from gradient-cli.

mikuts avatar mikuts commented on May 28, 2024

if env variables get passed in correctly they get set the same way that you would with export X=1. you can read them in code as X = os.getenv('X'). you should see them on the actual job/experiment (which will be pushed out on the api side soon).

the config.json being on /storage is okay, just not a recommended practice, the persistent volume is only accessible to your workloads that are executed within your paperspace team. Might accidentally copy/move that config somewhere you didn't intend to, other people can see the config within the team (wouldn't want coworker seeing my github creds for instance), accidentally leak api key, ect).

from gradient-cli.

mikuts avatar mikuts commented on May 28, 2024

@lefnire re: working_dir - will update the documentation a bit to make this more clear: this is not a parameter for the WORKDIR of the container but the relative folder you want to be executing command from when you use a remote workspace (like github). shouldn't need to rebuild the container and package up your code inside every time you iterate, can instead snapshot your local directory or pull from a branch when the notebook/job/experiment/deployment executes.

from gradient-cli.

lefnire avatar lefnire commented on May 28, 2024

Thanks a million for the details @mkutsovsky !

from gradient-cli.

paperspace-philip avatar paperspace-philip commented on May 28, 2024

@lefnire we release a new version the gradient. This version we are using envVars instead of job_env and it should work as expected.

from gradient-cli.

lefnire avatar lefnire commented on May 28, 2024

y'all rock, thanks a million!

from gradient-cli.

Related Issues (20)

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.