Closed 404notfoundyc-L closed 2 weeks ago
Hi @404notfoundyc-L are you asking how to install a dependency inside a sandbox?
I'm not sure from what app is the UI you shared - that's not from us so not sure how they're handling it
Hi @404notfoundyc-L are you asking how to install a dependency inside a sandbox?
I'm not sure from what app is the UI you shared - that's not from us so not sure how they're handling it
yes, I want to know how to install a dependency inside a sandbox. As the image I provided shows, I want to be able to customize and install some third-party dependencies to run the code.
@404notfoundyc-L check out custom sandboxes. You can create your own custom sandbox with dependencies preinstalled. The other option is to install dependencies dynamically during runtime. You can do that by starting any process inside the sandbox (docs)
JS/TS
await sandbox.process.startAndWait("npm i ...")
Python
sandbox.process.start_and_wait("npm i ...")
Hey @404notfoundyc-L, were you able to use the custom dependencies with your project?
Hey @404notfoundyc-L, were you able to use the custom dependencies with your project?
yes, I install custom dependency with sandbox.process
successfully. Thank you!
How to execute the code with sandbox of the imported package? For example:![image](https://github.com/e2b-dev/code-interpreter/assets/173258816/9e32f599-fddd-4e44-882f-9c2b79920b71)