Pixi Environments¶
Use an ASF-provided notebook and pixi.toml to create a Pixi environment¶
Open the following notebook:
/home/jovyan/conda_environments/Create_OSL_Pixi_Environments.ipynbRun the notebook to select and build one of the available environments.
Alternatively, the notebook allows you to point to a custom
pixi.tomlthat you provide.
Install Pixi packages within a running notebook’s environment¶
The following only works if your pixi.toml file is in the same directory as your notebook. This is not the case for OpenScienceLab provided environments, but can be done through the Custom Environment option in /home/jovyan/conda_environments/Create_OSL_Pixi_Environments.ipynb
Run the following command in a code cell:
!pixi add <package_name>Install Pixi packages in an existing environment from the terminal¶
Open a terminal and navigate to where your
pixi.tomlfile isRun the following command
pixi add <package_name>Conda Environments¶
Users can install additional software in isolated Conda environments on their persistent storage volumes with conda or mamba (conda’s faster reimplementation).
OpenScienceLab user images include a default base conda environment with a minimal amount of software installed. Users may create additional conda environments on their persistent user volumes to support workflows in Jupyter Notebooks or Python scripts.
Use an ASF-provided notebook and environment.yml to create a Conda environment¶
Open the following notebook:
/home/jovyan/conda_environments/Create_OSL_Conda_Environments.ipynbRun the notebook to select and build one of the available environments.
Alternatively, the notebook allows you to point to a custom
environment.ymlthat you provide.
Install Conda packages within a running notebook’s environment¶
Run the following command in a code cell:
%mamba install -c conda-forge <package_name> --yesInstall Conda packages in an existing environment from the terminal¶
Open a terminal and run the following commands:
mamba activate <environment_name>
mamba install <package_name>pip¶
pip is a package installer for Python.
You can install pip packages onto your persistent volume in the following manner:
Install pip packages inside of a Conda environment from the terminal¶
Open a terminal and use the following commands:
conda activate <environment_name>
python -m pip install <package_name>Include pip packages in a Conda environment.yml¶
Include
pipin the dependency listAdd a
pipsection to the bottom of the dependency list in anenvironment.yaml
name: environment name
channels:
- conda-forge
dependencies:
- package_1
- package_2
- package_3
- pip
- pip:
- pip_package_1
- pip_package_2apt and apt-get¶
Users cannot install software in OpenScienceLab using apt or apt-get.