Python, Conda and Pip: Exercise
Goal: Provide an exercise to work through that puts together the various concepts covered within this workshop.
Exercise: Put Things Together
Exercise: Create a self contained Conda environment that would allow a user to run a python file that uses PyTorch.
The environment should be created within a location that can be shared with other users within a project.
Make sure the environment can utilize GPUs running with
cuda
12.4.
Using the the following
pytorch_gpu_test.py
script, create a bash script to submit a job to the cluster that allows this to be run, using the created Conda environment, that utilizes one H100 NVidia GPU device on a single compute node, with 8 cores and 16G of memory.Any output should be written into a
slurms
sub folder, with a filename of the formpytorch_<job-id>.out
Send email notification to yourself regards the status of the submission.
Ignoring any cached packages, how much storage space does this Conda environment use?
Which version of Python is being used?
Exercise: Extend with Pandas
Exercise: Suggested Answers: Create the Environment
[pytorch]$ du -d 1 -h
6.3G ./pytorch_env
6.3G
Exercise: Suggested Answers: Run the Code
Exercise: Suggested Answers: Extend with Pandas