How to add dependencies to your environment
There are four ways to add dependencies to your project:
tensorflow==2.10.0
(most common)requirements.txt
setup.sh
We’ll walk through each of these scenarios below.
To install packages, click the “Add Dependency” button at the bottom of the page. You can either enter the Python package name to install, or you can upload an existing requirements.txt
file:
You may want to install dependencies from a Github repo. To do so, you can use our Github Integration to import your repo as a submodule dependency in the sandbox.
First, you’ll need to connect your Github to Slai. You can do that on the Integrations page.
After connecting your Github account to Slai, you can import repos directly into a sandbox.
Click the + Add File icon in the files section, and select Import from Github. You can also enter the URL of any Github repo you have read access to.
You’ll be prompted to select from a list of repos in your account.
After importing a repo, you’ll see all the files in the repo added to the file tree.
After importing your repo, you can reference any of the modules like any ordinary Python module.
You may want to use dependencies that aren’t public on pip. For this use case, we recommend using the setup.sh
script. setup.sh
can be customized with anything that you’d apt-get install
in a Docker container.
Select the setup.sh
option in the config section of the sandbox.
Here’s an example of how you might use it:
How to add dependencies to your environment
There are four ways to add dependencies to your project:
tensorflow==2.10.0
(most common)requirements.txt
setup.sh
We’ll walk through each of these scenarios below.
To install packages, click the “Add Dependency” button at the bottom of the page. You can either enter the Python package name to install, or you can upload an existing requirements.txt
file:
You may want to install dependencies from a Github repo. To do so, you can use our Github Integration to import your repo as a submodule dependency in the sandbox.
First, you’ll need to connect your Github to Slai. You can do that on the Integrations page.
After connecting your Github account to Slai, you can import repos directly into a sandbox.
Click the + Add File icon in the files section, and select Import from Github. You can also enter the URL of any Github repo you have read access to.
You’ll be prompted to select from a list of repos in your account.
After importing a repo, you’ll see all the files in the repo added to the file tree.
After importing your repo, you can reference any of the modules like any ordinary Python module.
You may want to use dependencies that aren’t public on pip. For this use case, we recommend using the setup.sh
script. setup.sh
can be customized with anything that you’d apt-get install
in a Docker container.
Select the setup.sh
option in the config section of the sandbox.
Here’s an example of how you might use it: