 So we are back and we will give a quick example of Python first So let's see. Let's go to my screen. So here we are. I Think I can remove this web browser and focus on terminal So let's see um Somewhere I had created something so CD so I made a demo Python directory and here under code Oh, I have nothing Python or so I'm copying this pie thing to code and Here I have a requirements file so it has the different software packages that I need to use So here I've just written the package that work x but I could write other things So what is this requirements for? so um so This is a Python construct so it says all the Python packages that your code needs So what I want to do is make my own virtual environment in order to run things so that way Let's see so that Like all my dependencies are together so I can take this and run it on Triton on my laptop on anywhere else And then it will just work without having to like deal with all the requirements and I'm adding some common Python packages here Let's see So first I will load anaconda and then I will create a virtual environment and this creates Let's see so Python dash M Tells it to use the virtual the VN module to create a directory called the end So after a little bit of time I See now there is oops the end here, so I can source Yeah, and then activate like this, okay there we go and Now I can do pip install dash R Requirements.txt and Now everything's getting installed to this requirements will be a short time for it to finish Okay, so now let's make a script Submit.sh bash Hmm that bash is a bit unreadable. Maybe I'll use nano Yeah, I think it's better to use probably a good editor S-batch I'll use four CPUs So first I'll do module purge to get rid of all loaded modules and then I will do Easter CPUs syntax, okay Shouldn't it be CPUs per task? Yeah, probably Good point. That's why you're here and Then let's see. Do you remember the environment variable for number of things? Slurm CPUs per task, I think, okay There we go. And then how many iterations will this be? Let's say a Five million iterations So is my code going to work? Maybe first I'll test it locally. So I save and Here's the code I want to run. Python 3 code threads equals 4 And let's run this with 5000 So we see it worked And I could tell it to use four threads and this was running on the login node Which is not what we want to do in general but is Fine for something that takes two seconds. So let's try submitting it Submit.sh Submitted Slurm queue. It says it's done. If I ls I see an output file. I Will open this output file and I see it says it's using four threads a pi estimate there There seems to be something wrong with the environment activation The VN of 3 is probably the wrong name. Okay. Yeah So in this case it didn't actually need to use the virtual environment I set up. Oh Let's try it again. We submit it You see it's running. It's done We see output and there we see it worked and now with this Requirements file I can take this and install the same things on my laptop or some other cluster and the code will hopefully Just work as usual Could this environment been created with gondor? Yeah, so we have to use virtual environment Yeah, so if you're doing something that's a bit more advanced and needs more complicated packages I'd recommend a conda environment instead But that's something that you can Read about yourself. We have instructions on that so conda and virtual environment are similar virtual environment is Python only and Conda is both Python and many other languages Okay, so with that said let's end