Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you need a custom environment, here is a step-by-step guide on getting started.

You will need to substitute appropriate values where I have used the ne4 project and my userid of dmo900 throughout; you may also not want to install the environment under /g/data/$PROJECT/$USERID (for example you might want it in /scratch if it is only for short term usage, or maybe directly under /g/data/$PROJECT if it is for use project-wide rather than just for your own use). Just make sure that you are consistent between the creation of the environment, the path you pass in the "Python or Conda virtual environment base", and ensure your job has the appropriate storage option applied to be able to see that path.

Creating the venv

  • Log into gadi, and load your preferred python module:
    $ module load python3/3.10.4
    Loading python3/3.10.4
      Loading requirement: intel-mkl/2021.4.0
    $

  • Create a new virtual environment:

    $ python3 -m venv /g/data/ne4/dmo900/testvenv

    $

    (we suggest putting the venv in /g/data or /scratch, as they can grow too large for storing in your home directory)

  • Activate the venv in the current session (note the leading "dot-space" to source the file into the current shell environment):

    $ . /g/data/ne4/dmo900/testvenv/bin/activate

    (testvenv) $

  • Update the pip and setuptools packages:

...