Skip to main content

v2.0

by z mbstaff

Introduction

This guide describes how to use and set up conda environments in order to use python on the ZMB virtual machines.

  1. Reserve and open any of the ZMB VMs This guide currently works for all ZMB VMs, EXCEPT for ZMB Standard VM and ZMB High Performance Server
    • Reserve and open any of the ZMB VMs

    • This guide currently works for all ZMB VMs, EXCEPT for ZMB Standard VM and ZMB High Performance Server

    • Open Miniforge

    • The miniforge prompt terminal should open

  2. List all available conda environments using conda env list There are several pre-installed environments available for you to use
    • List all available conda environments using conda env list

    • There are several pre-installed environments available for you to use

    • zmb_cellpose_v3 & zmb_cellpose_v4: contain cellpose 3.1 and 4.2 respectively

    • zmb_stardist_cpu & zmb_stardist_gpu: contain stardist 0.9; stardist-napari; jupyter-lab

    • The GPU version of stardist has a slow initialization, so it only pays off for larger datasets. For small ones, use the CPU version.

    • Activate an environment: conda activate zmb_cellpose_v4

    • The environment is active, when it is listed in brackets at the start of the line

    • The pre-installed environments are fixed and cannot be altered. If you need to install new packages, you need to create your own environment (see next steps).

  3. To install your own environment, run e.g.: conda create -n test_env python=3.12 -y This creates an environment called test_env with python version 3.12 installed After it is done installing, activate it: conda activate test_env
    • To install your own environment, run e.g.: conda create -n test_env python=3.12 -y

    • This creates an environment called test_env with python version 3.12 installed

    • After it is done installing, activate it: conda activate test_env

    • Confirm the environment is activated by checking the name in the brackets at the start of the line

    • Install python packages either via conda install <package_name> or pip install <package_name>

    • Never install anything in the base environment

    • From the activated environment, you can run a python script using e.g. python run some_script.py

    • Custom conda environments live in %USERPROFILE%\conda\ (e.g. C:\Users\z.mbuser\conda\). The profile has only 30GB, so keep custom environments to a minimum, especially large ones containing e.g. PyTorch. You can remove an environment with e.g.: conda remove -n test_env --all -y

Finish Line

z mbstaff

Member since: 5/6/19

5,774 Reputation

102 Guides authored

0 Comments

Add Comment



View Statistics:

Past 24 Hours: 0

Past 7 Days: 1

Past 30 Days: 22

All Time: 24