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)
NoteIf 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 wingetIf 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
uvby running:curl -LsSf https://astral.sh/uv/install.sh | shClose and re-open your terminal, if the installer requests this.
NoteIf you haveuvinstalled alreadyUpgrade to the latest version of
uvbefore continuing, by runninguv self update, or by upgrading through whatever means you used to installuvoriginally (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-aiCheck 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 notebooksIn future, just re-run this command to get access to the course again.