Run the code on your own machine
To follow along on your own machine, follow these instructions:
Open a terminal (or Git Bash if you’re using Windows)
If you’re using WindowsWe recommend that you install Git and Git Bash, unless you are using Windows Subsystem for Linux (WSL). You should be able to do this by running the following command in command prompt or Powershell:
winget install --id Git.Git -e --source winget
If this doesn’t work, then follow the instructions on the Git website.
If you want to use PowerShell you can try looking on the winstall website.
Remember to restart your terminal afterwards!
Install
uv
by running:curl -LsSf https://astral.sh/uv/install.sh | sh
Close and re-open your terminal, if the installer requests this.
If you haveuv
installed alreadyUpgrade to the latest version of
uv
before continuing, by runninguv self update
, or by upgrading through whatever means you used to installuv
originally (for example, Homebrew users would runbrew upgrade uv
).Download the course content:
git clone https://github.com/Bristol-Training/intro-to-ai cd intro-to-ai
Check your PyTorch version:
uv run python -c "import torch; print('PyTorch version', torch.__version__)"
This command will automatically download the version of Python and associated libraries that are required for the course, before displaying the version of PyTorch on the screen. This should be something like
2.7.0
.Run Jupyter Lab:
uv run jupyter lab notebooks
In future, just re-run this command to get access to the course again.