For CMSC 490 you will be doing all of your work on a server that we have assigned to you. You should already have received an email giving you the address of your server, your user name on that server, and your password.
You will be doing all of your work for this course on Visual Studio Code. You will be using the SSH tools in Visual Studio Code to connect to your assigned server workspace. If you do not already have Visual Studio Code installed, you can download it at https://code.visualstudio.com/download.
You will need to have the Remote - SSH extension installed in Visual Studio Code. To install that, click on the extensions tab on the left side bar and type ssh into the search box in the extensions view.
Once you have the extension installed you can click on the blue >< button in the lower left hand corner of the window to initiate a remove connection. You will see a list of commands pop up in the command pallette. Click on the Connect to Host... command and then enter your user name and host address in the form
<user name>@<host address>
As soon as you enter the server information a new window will pop up and you will see a prompt to enter your password.
The first time you connect to your server account you will need to do some setup.
Start by opening a terminal pane in the remote window by selecting the New Terminal command from the Terminal menu.
In the terminal run these commands:
mkdir work cd work python3 -m venv torchenv source torchenv/bin/activate pip install jupyter pip install torch torchvision --index-url https://download.pytorch.org/whl/cu129
These commands will set up a work directory where you will doing all of your work and then set up a python environment in that directory and equip that environment with the software necessary to run Jupyter notebooks and PyTorch.
We will be working with python and Jupyter notebooks in your remove window. In preparation for this click on the extensions tab in your remove tab and install the Python and Jupyter extensions.
Next, click the Explorer tab in Visual Studio Code and then click the Open Folder button. Select your work directory to open it in the Explorer.
The first notebook you will be working with is the introduction to python notebook we have prepared. Any time we provide a notebook for you you will first download that notebook onto your own computer and then upload that notebook to your work space.
Here is the link for that first notebook: first notebook
Clicking that link will download it to your local downloads folder. If you open that folder you can then drag that file into the explorer pane in Visual Studio Code to upload it to your workspace. Later you can also download that file back to your local computer by right-clicking it in the explorer pane and selecting the download command.
Double-click on the intro.ipynb file to open it. In the upper right hand corner of the window you will see a Select Kernel button. Click that button and select the torchenv environment you set up in the previous step.
Jupyter notebooks consist of Code cells and Markdown cells. If you hover your mouse over a code cell you should see a little run triangle appear next to the cell. Click that run triangle to execute the code in the cell.
You will want to work down through the cells in this introductory notebook and run them all to see what each cell does. You can also edit the code in any code cell and rerun that cell to see the effect of your changes.
Once you are done with a notebook you can save your changes. If you want, you can also right-click on the notebook in the explorer and select the download command to download a copy of the notebook to your own computer.