Customize or update environment
You can build a custom Docker image on top of the default one to customize your environment (install some package from apt to be available in your notebooks, or set up a custom Python environment by pre-installing the required libraries).
After you create a new custom environment or update one of our environments, run the following command in the same file:
RUN /opt/datalore/build_code_insight_data.sh /[environment_path]
where [environment_path]
is the path to the environment you created or updated.This is used to generate indexes required for the editor's proper work. If not performed, these indexes will be updated every time the agent starts, which slows down the editor.
Examples
Modify the pip/minimal environment
FROM jetbrains/datalore-agent:2022.2.3
RUN my_set_credentials_and_urls.sh
RUN /opt/python/envs/minimal/bin/python -m pip install -r my_additional_packages.txt
RUN /opt/datalore/build_code_insight_data.sh /opt/python/envs/minimal
Create a new environment
Assuming the name of the new environment is myenv
:
FROM jetbrains/datalore-agent:2022.2.3
RUN my_set_credentials_and_urls.sh
RUN /opt/python/bin/python -m venv /opt/python/envs/myenv
RUN /opt/python/envs/myenv/bin/python -m pip install -r /tmp/requirements_myenv.txt
RUN /opt/datalore/build_code_insight_data.sh /opt/python/envs/myenv
Last modified: 08 September 2022