Code for dimension-reduction project.
(Note this has been tested on Ubuntu 22.04 and NixOS only but should work as long as you have nix installed)
Steps:
- Ensure
nix
is installed following the instructions here. (Note: If you are using NixOS you can skip this step.) - Enable
nix
flakes following the instructions here. - Clone the repo
cd
into the repo (cd grassgp
)- Activate the nix flake by running
nix develop
(this might take a while). - Use
poetry
to install the Python source code and the Python source dependencies:poetry install
- (Optional): Install the Julia source code to generate the data for the localised active subspace examples:
- Activate a Julia REPL:
julia
- Open the Julia
pkg
REPL by pressing]
from the Julia REPL. - Activate the environment contained in the repo root:
activate .
- Instantiate the enviroment via:
instantiate
(this might take a while).
- Activate a Julia REPL:
- You can now spawn a Python shell with all the dependencies using
poetry shell
. - (Alternatively/recommended): you can launch a Jupyterlab environment containing the Python and Julia dependencies using:
poetry run jupyter lab
Steps:
- Clone the repo
cd
into the repo (cd grassgp
)- Create a virtual environment
- Install
poetry
-- suggested method:- Install
pipx
- Install
poetry
withpipx install poetry
- Install
- (Optional/recommended): upgrade pip with
pip install --upgrade pip
- Activate virtual environment.
- Use
poetry
to install:poetry install
- (Optional): Install the Julia source code to generate the data for the localised active subspace examples:
- Install Julia stable following the instructions here.
- Activate a Julia REPL:
julia
- Open the Julia
pkg
REPL by pressing]
from the Julia REPL. - Activate the environment contained in the repo root:
activate .
- Instantiate the enviroment via:
instantiate
(this might take a while).
- You can now spawn a Python shell with all the dependencies using
poetry shell
. - (Alternatively/recommended): you can launch a Jupyterlab environment containing the Python and Julia dependencies using:
poetry run jupyter lab