# Cardiac Digital Twin Summer School (CaDiTSS) Environment Setup Instructions Here are a **couple of options** for creating an environment with the requested packages: **conda** and **uv (pip)** solutions. --- ## ✅ 1️⃣ `uv` Environment (Fast Modern Pip) [`uv`](https://docs.astral.sh/uv/) is a fast drop-in for pip/venv. You can create a project with a `pyproject.toml` or a simple requirements file. ### Option A: Using `uv venv` + `uv pip` ```bash uv venv .venv --python 3.10 source .venv/bin/activate # or .venv\Scripts\activate on Windows uv pip install torch numpy matplotlib scikit-image SimpleITK opencv-python pydicom gpytorch myokit ``` ### Option B: Using a requirements file `requirements.txt`: ``` torch numpy matplotlib scikit-image SimpleITK opencv-python pydicom gpytorch myokit ``` Then: ```bash uv pip install -r requirements.txt ``` --- ### ⚡ Notes * **GPU with pip/uv**: if you need CUDA, use the appropriate torch wheel (e.g. `pip install torch==2.4.0+cu118 --index-url https://download.pytorch.org/whl/cu118`). * `SimpleITK` uses a capital S in pip (`SimpleITK`). --- ## ✅ 2️⃣ Conda Environment Conda can install most of these packages from `conda-forge` (or `pytorch` for GPU). Here are **two variants** depending on whether you want CPU-only or GPU-enabled PyTorch. ### **Option A: CPU-only** Create a YAML file (e.g., `env_cpu.yml`): ```yaml name: ai-med-cpu channels: - conda-forge - defaults dependencies: - python=3.10 - pytorch - numpy - matplotlib - scikit-image - simpleitk - opencv - pydicom - gpytorch - myokit ``` Create it: ```bash conda env create -f env_cpu.yml ``` --- ### **Option B: GPU (CUDA)** If you have a compatible NVIDIA GPU: ```yaml name: ai-med-gpu channels: - pytorch - conda-forge dependencies: - python=3.10 - pytorch - torchvision - torchaudio - pytorch-cuda=11.8 # or 12.1 depending on your driver - numpy - matplotlib - scikit-image - simpleitk - opencv - pydicom - gpytorch - myokit ``` Create it: ```bash conda env create -f env_gpu.yml ``` ## Session-specific Instructions <div style="background-color: #d0ebff; padding: 10px; border-radius: 5px;"> 👇👇👇🚩🚩🚩📢 UPDATE Oct 6th 📢🚩🚩🚩👇👇👇 ### Abdul Qayyum * follow instructions from: https://github.com/RespectKnowledge/Motion_Alan_Turing ### Richard Wilkinson * Participants will use Google Colab during this session. For this reason, they will need to have an active Google account. Participants who do not have a Gmail account, may be able to use other login details they use to access Google products, such as YouTube. </div> <div style="background-color: #f9f9a9; padding: 10px; border-radius: 5px;"> 👇👇👇🚩🚩🚩📢 UPDATE Oct 2nd 📢🚩🚩🚩👇👇👇 ### Richard Wilkinson * Participants will use Google Colab during this session. For this reason, they will need to have an active Google account. Participants who do not have a Gmail account, may be able to use other login details they use to access Google products, such as YouTube. ### Gary Mirams Revised on Oct 6th udpate (above): By using Google Colab this session will now not require local installations. ~~Install a C compiler (all operating systems) and Sundials (linux & mac only) following the instructions on~~ ~~https://myokit.org/install)~~ </div> ### Steve Williams - Participants will need to install ‘EP Workbench’ before the summer school. https://openep.io/documentation/ ### Martin Bishop - Matlab installed: https://www.mathworks.com/help/install/ug/install-products-with-internet-connection.html ### CEMRG's session Have a laptop with Paraview installed (https://www.paraview.org/download/) ### Caroline Rooney - Install Docker (https://docs.docker.com/engine/install/) - Install openCARP docker (https://opencarp.org/download/installation#installation-of-opencarp-docker-containers) - Download Paraview (https://www.paraview.org/download/) - Follow the github instructions (https://github.com/pcmlab/atrialmtk) to create conda environments for running the codes **Note**: For windows users, we recommend using Windows Subsystem for Linux (WSL). Installing openCARP on Windows can be time consuming, so we recommend installing in advance, by following these steps provided on the openCARP website: https://opencarp.org/download/installation/install-wsl *** ## Drop-in for assistance * October 1st, 1pm-1.30pm Zoom Link sent to confirmed participants via email *** <br>