Skip to content

Installation#

Setting up a user environment#

As a caveat user, it is easiest to install using the mamba package manager, as follows:

  1. Install mamba with the Mambaforge executable for your operating system.
  2. Open the command line (or the "miniforge prompt" in Windows).

  3. Create the caveat mamba environment: mamba create -n caveat -c conda-forge -c city-modelling-lab caveat

  4. Activate the caveat mamba environment: mamba activate caveat

All together:

Running the example notebooks#

If you have followed the non-developer installation instructions above, you will need to install jupyter into your caveat environment to run the example notebooks:

mamba install -n caveat jupyter

With Jupyter installed, it's easiest to then add the environment as a jupyter kernel:

mamba activate caveat
ipython kernel install --user --name=caveat
jupyter notebook

Choosing a different environment name#

If you would like to use a different name to caveat for your mamba environment, the installation becomes (where [my-env-name] is your preferred name for the environment):

mamba create -n [my-env-name] -c conda-forge --file requirements/base.txt
mamba activate [my-env-name]
ipython kernel install --user --name=[my-env-name]

Setting up a development environment#

The install instructions are slightly different to create a development environment compared to a user environment:

git clone git@github.com:big-ucl/caveat.git
cd caveat
mamba create -n caveat -c conda-forge -c city-modelling-lab -c pytorch --file requirements/base.txt --file requirements/dev.txt
mamba activate caveat
pip install --no-deps -e .

Caveat is in development, hence an "editable" (-e) install is recommended.

Jupyter Notebooks#

To run the example notebooks you will need to add a ipython kernel into the mamba environemnt: ipython kernel install --user --name=caveat.

Windoes and CUDA#

If you want to get a cuda enabled windows install you can try the following mamba create:

mamba create -n caveat -c conda-forge -c city-modelling-lab -c pytorch -c nvidia --file requirements/cuda_base.txt --file requirements/dev.txt
Or lake a look here. Note that you need to have the right version of python.