WSL2 is a Windows feature that allows near-native execution of ELF binaries like Unix bash and Gnome apps. Recent versions of Windows support GPU acceleration and mounting ext4 disks, which turns a powerful gaming PC into a powerful Linux workstation without needing to dual-boot two operating systems. The guide below helps you set up WSL2, install TensorFlow with GPU acceleration, and then test SpliceAI on a VCF.
- Make sure you have the latest version of Windows 10 or 11 and administrative rights.
- Hit the Windows key, type
cmd
, right-click onCommand Prompt
,Run as Administrator
, and clickYes
if prompted byUser Account Control
. - Follow these instructions to install WSL2. It should be as simple as
wsl --install -d Ubuntu
and reboot. But older Windows 10 may need more tinkering, likewsl --update
to update the Linux kernel. - Hit the Windows key, type "Ubuntu", and hit enter. Type "nvidia-smi -L" and make sure you can see your GPU listed.
- Install mamba (fast conda replacement that uses conda-forge as default channel):
curl -L https://github.com/conda-forge/miniforge/releases/download/22.11.1-4/Mambaforge-Linux-x86_64.sh -o /tmp/mambaforge.sh
sh /tmp/mambaforge.sh -bfp $HOME/mambaforge && rm -f /tmp/mambaforge.sh
- Add the following lines to your bashrc so you can use mamba/conda to create development environments:
# Add mamba and code to PATH if found
if [ -f "$HOME/mambaforge/etc/profile.d/conda.sh" ]; then
. $HOME/mambaforge/etc/profile.d/conda.sh
fi
- Exit the terminal and start it up again so your
~/.bashrc
gets loaded again. - Use
mamba
to create an environment with tensorflow-gpu installed, activate it, and test it out:
mamba create -y -n gpu tensorflow-gpu
conda activate gpu
python -c 'import tensorflow as tf; print(tf.config.list_physical_devices("GPU"))' 2>/dev/null
- Install SpliceAI and the third-party wrapper that let's you cache results:
mamba install -yc bioconda spliceai==1.3.1 spliceai-wrapper==0.1.0