.. _installation: ************ Installation ************ .. warning:: - TARDIS is only supported on macOS and GNU/Linux. Windows users can run TARDIS from our official Docker image (*coming soon*), `WSL `_ or a Virtual Machine. - TARDIS packages and dependencies are distributed only through the `conda `_ package management system, therefore installation requires `Anaconda `_ or `Miniconda `_ to be installed on your system. Install with lockfiles ====================== Conda lockfiles are platform-specific dependency files that produce repeatable environments. These files are generated on every new release. We strongly recommend installing TARDIS using this method by following the steps described below. 1. Download the latest lockfile for your operating system from our `releases section `_, or run the following command while replacing ``{platform}`` with ``linux`` or ``osx`` as appropriate. :: $ wget -q https://raw.githubusercontent.com/tardis-sn/tardis/master/conda-{platform}-64.lock 2. Create and activate the ``tardis`` environment. :: $ conda create --name tardis --file conda-{platform}-64.lock $ conda activate tardis 3. a. Developers should `fork the repository `_, configure GitHub to `work with SSH keys `_, set up the `upstream remote `_, and install the package in development mode. :: $ git clone git@github.com:/tardis.git $ cd tardis $ git remote add upstream git@github.com:tardis-sn/tardis.git $ git fetch upstream $ git checkout upstream/master $ python setup.py develop .. note:: The complete developer guidelines can be found :ref:`here `. b. Non-developers can install from specific releases using pip- :: $ pip install git+https://github.com/tardis-sn/tardis.git@{tag} For example- :: $ pip install git+https://github.com/tardis-sn/tardis.git@release-latest or trying the most recent, unreleased changes from upstream. :: $ pip install git+https://github.com/tardis-sn/tardis.git@master 4. Once finished working, you can deactivate your environment. :: $ conda deactivate From now on, just activate the ``tardis`` environment before working with the TARDIS package. You have successfully installed TARDIS! 🎉 Please refer to `Quickstart for TARDIS `_ to start running simulations. .. Install from package .. ==================== .. It's also possible to install TARDIS by pulling the `conda-forge package `_ .. into a clean environment. However, we still encourage using lockfiles to ensure .. reproducibility of scientific results. .. :: .. $ conda create --name tardis-forge tardis-sn --channel conda-forge Environment update ================== To update the environment after a new release, download the latest lockfile and run ``conda update``. :: $ wget -q https://github.com/tardis-sn/tardis/releases/latest/download/conda-{platform}-64.lock $ conda update --name tardis --file conda-{platform}-64.lock .. note:: If you have installed the tardis package in development mode, you should *ideally* update your environment whenever you pull latest tardis code because the new code added might be using updated (or new) dependencies. If you don't do that and your tardis installation seems broken, you can check if your environment requires update by comparing it against the latest environment file: :: $ conda compare --name tardis tardis_env3.yml