Comments (8)
Would creating /storage/config.json
be a bad idea security-wise?
from gradient-cli.
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.
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.
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.
@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.
Thanks a million for the details @mkutsovsky !
from gradient-cli.
@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.
y'all rock, thanks a million!
from gradient-cli.
Related Issues (20)
- Failed to create resource HOT 2
- Experiment worker command base64-encoded HOT 1
- Unable to install due to numpy==1.19.4 HOT 7
- Update older example or create new ML5js example PLEASE HOT 1
- dead link in documentation HOT 1
- Problem running gradient in the cli for Win10
- ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly HOT 1
- Failing to start notebook HOT 3
- Support for click < 8 HOT 1
- Gradient CLI won't list available machine types HOT 2
- can not instantiate ipywidgets.Output in notebook HOT 1
- Failed to execute request against storage provider when uploading a dataset HOT 3
- Update version specifier
- my ip is banned by cloudflare
- Request to Increase Supported Marshmallow Version
- 'gradient' is not recognized as an internal or external command, operable program or batch file on Windows 11
- PyYAML 5.4.1 is broken, use PyYAML 5.3.1 instead HOT 3
- PyYAML dependency issue
- Why there is no deployments interfaces in SDK, only can be found in CLI? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradient-cli.