hopsworks.environment #
[source] Environment #
[source] install_wheel #
Install a python library packaged in a wheel file.
import hopsworks
project = hopsworks.login()
# Upload to Hopsworks
ds_api = project.get_dataset_api()
whl_path = ds_api.upload("matplotlib-3.1.3-cp38-cp38-manylinux1_x86_64.whl", "Resources")
# Install
env_api = project.get_environment_api()
env = env_api.get_environment("my_custom_environment")
env.install_wheel(whl_path)
| PARAMETER | DESCRIPTION |
|---|---|
path | The path in Hopsworks where the wheel file is located. TYPE: |
await_installation | If TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
Library | The library object. |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request. |
[source] install_requirements #
Install libraries specified in a requirements.txt file.
import hopsworks
project = hopsworks.login()
# Upload to Hopsworks
ds_api = project.get_dataset_api()
requirements_path = ds_api.upload("requirements.txt", "Resources")
# Install
env_api = project.get_environment_api()
env = env_api.get_environment("my_custom_environment")
env.install_requirements(requirements_path)
| PARAMETER | DESCRIPTION |
|---|---|
path | The path in Hopsworks where the TYPE: |
await_installation | If TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
Library | The library object. |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request. |