back to indexLive coding 4
Chapters
0:0 Create an notebook
4:13 Symlink from persistence storage
19:24 Create pre-run.sh from scratch
33:15 Create SSH keys from scratch
00:00:00.000 |
So let's see how to do that paper space stuff that we did in the last session, but from 00:00:16.360 |
And one very reasonable comment on the forum after yesterday's session was like this all 00:00:23.360 |
seems kind of complicated and it is and like definitely one option is like don't worry 00:00:32.440 |
about it for now, but I would say like trying to get this working is a pretty good exercise 00:00:40.320 |
actually so you know it's totally up to you but I you know I think it's I think it's probably 00:00:48.440 |
worth worth trying to get working and ask lots of questions about anything that you're 00:00:55.280 |
not sure if it doesn't make sense or it doesn't work for you or whatever. 00:01:00.160 |
Okay so if I say share screen here we go share portion of screen I've never tried this before 00:01:09.280 |
and I think what happened share move that this is cool okay do you see my browser window. 00:01:28.800 |
Yes, yes, all right okay I'm successfully sharing a portion of the screen. 00:01:41.480 |
So what I did this morning was I just went in and moved all of my paper space set up 00:01:46.320 |
in persistent storage out of the way so that when I create a notebook. 00:02:08.560 |
How did you move it out of the way to raising the best options. 00:02:12.520 |
I know I mean I just like I went into slash storage and moved the files to rename to them 00:02:19.480 |
to give them a light dot bak extension or whatever so they wouldn't be run and moved 00:02:23.800 |
everything into a different order, that's all. 00:02:31.360 |
This should look like what you should also say, so I got to delete the workspace URL 00:02:35.180 |
so we have something totally empty which I think is actually probably best right and 00:02:46.200 |
yeah so follow along if you want and if anything doesn't work for you let me know. 00:02:57.120 |
And then what I thought we would do is I like to learn as few things as possible because 00:03:05.600 |
I'm lazy and so the way to get away with being lazy and learning as few things as possible 00:03:11.080 |
is to learn things which are really versatile and powerful so that they can like do a lot 00:03:18.440 |
of things so in particular I haven't really spent the time to learn bash scripting very 00:03:26.360 |
well I know it a little bit because I have instead spent the time to learn to use python 00:03:34.120 |
as an effective scripting language and I can also use python for machine learning I can 00:03:38.400 |
also use python for creating web services I can also use python for creating console 00:03:46.800 |
applications I can you know use python for creating continuous integration scripts etc 00:03:52.200 |
so that way I can be lazy and I like being lazy it's one of Larry Wall's three virtues 00:03:58.880 |
of a great programmer is laziness along with impatience and hubris and I would like to 00:04:05.120 |
be a great programmer so I follow those principles so let's try to use python to to kind of automate 00:04:13.000 |
the things we want to do so remember that you know we're going to avoid using the weird 00:04:20.720 |
proprietary GUI because we're lazy we don't want to learn it and also because it's not 00:04:24.600 |
that good so I'm just going to open up a second tab and so over here I'll click jupyterlab 00:04:39.080 |
and so what we should find is that we're in a totally empty spot here we go so this morning 00:04:48.080 |
I did do some reading of documentation which is also a great thing to do if you're lazy 00:04:52.360 |
because if you read documentation then you can like find out straight away how things 00:04:56.440 |
work rather than spending ages trying to figure it out and so the documentation for paper 00:05:00.400 |
space was actually very useful and it explained how their different folders work exactly so 00:05:16.320 |
in the root directory um this would be a bit bigger I think there we go um actually I think 00:05:26.360 |
if I go view presentation mode or something it makes it a bit bigger anyway that didn't 00:05:32.100 |
do anything at all okay um in the root directory there's a couple of particularly interesting 00:05:38.960 |
folders most of the folders you see here are the same that you would find in any linux box 00:05:43.180 |
but the notebooks and storage folders are interesting and one of the ways we know they're 00:05:48.080 |
interesting is if I go df minus h which you might remember is disk free it lists all the 00:05:52.880 |
mounted disks uh in human form um it's made it way too wide so we can't really read it 00:06:01.360 |
yeah never mind um okay I make it smaller just for the purpose of showing you this um 00:06:10.200 |
so the uh slash notebooks is actually on a whole separate 500 gigabyte disk and slash 00:06:18.840 |
dot storage is on a whole separate 500 gigabyte disk um the uh so what paper space does is 00:06:26.160 |
slash storage anything I put in there is going to be seen by every single notebook server 00:06:34.000 |
I create and in fact if you've got I think if you've got like multiple people in the 00:06:37.640 |
organization they might see the same thing as well um so that's going to be shared across 00:06:43.360 |
um yeah or any notebook server I create that's um that's going to be handy because anything 00:06:49.020 |
I want to use on every one of my servers if I put it in there then I don't have you know 00:06:53.400 |
I don't have to worry about recreating it each time um something we didn't mention last 00:06:59.080 |
time is slash notebooks is interesting that's also persistent storage but it's persistent 00:07:04.820 |
storage just for this one server um so stuff that's in there we will see every time we 00:07:12.640 |
start up this server if we delete this server it's it's gone unless we back it up um so 00:07:19.040 |
that's where we would put things that we don't want on every server but just on just on this 00:07:23.280 |
one um you pay for storage um and you pay I think it's like 30 cents a gigabyte or something 00:07:32.780 |
like that per month um and they don't limit you you know except for the 500 gig limit 00:07:39.560 |
so it's up to you to be careful of that um you will find in your account there's a section 00:07:46.080 |
called billing that shows you how much storage you're using um so they will add up stuff 00:07:53.120 |
in slash storage that just appears once and every single one of your notebook servers 00:07:57.240 |
slash notebooks that will all be added together okay um so the first thing we did last time 00:08:08.280 |
was we tried installing something extra from pip um so one conversation that we had on 00:08:16.320 |
the forum since then is like are you sure that's not going to mess me up because you 00:08:25.560 |
know paper space is installed stuff I believe using condor um and pip and condor are different 00:08:32.580 |
things for installing python libraries um so you know is that going to mess things up 00:08:40.640 |
and the the official answer is yes it will don't do it um but the unofficial answer is 00:08:48.640 |
you know we've got tens of thousands of people on our forums and I've never heard of anybody 00:08:53.420 |
in practice actually having any problem with using both pip and condor slash mamba so I'm 00:09:00.280 |
just going to say don't worry about it um as we said yesterday I think the only the place 00:09:07.920 |
you really need to use condor or mamba is is for stuff that uses the GPU um and particularly 00:09:14.240 |
for pytorch or if heaven forbid you have to use tensorflow um yeah so I gotta say don't 00:09:23.680 |
worry about it and and the reason we um we actually want to use pip in this particular 00:09:29.160 |
case is we want to be able to install the packages into a into our home directory into 00:09:35.920 |
a different place um yeah the reason the reason we want to use mamba or condor for stuff that 00:09:45.680 |
requires the gpu is that they have a way of installing dependencies right like uh they 00:09:53.880 |
they have a way of installing the uh the cuda toolkit requirements so we don't have to install 00:09:59.400 |
the cuda sdk um is basically the reason and that's um and and it's not just like one less 00:10:07.640 |
thing to install but more importantly it's one less thing to maintain like you don't 00:10:13.240 |
like your cuda version and your pytorch version have to the mesh correctly otherwise it'll 00:10:18.540 |
break and if you just use condor that happens automatically but if you use pip then it's 00:10:24.280 |
up to you to make sure you're installing the correct meshing versions of each things um 00:10:29.920 |
it's also more challenging in something like paper space because you know installing things 00:10:35.060 |
like the the cuda sdk into your home directories i don't even know how you would do it without 00:10:42.200 |
using condor frankly yep does that answer your question radik yes thank you very much 00:10:48.400 |
okay great um so somebody's got a loud plicky keyboard they should probably mute themselves 00:10:57.200 |
um yes hi hi if if the pip installation and do something wrong 00:11:13.840 |
yeah i mean kind of you can always just type pip uninstall um or just delete your member 00:11:33.220 |
forge directory and start again um but you know people always like i mean or you can 00:11:41.400 |
just you know install a condor package over the top of it like it shouldn't really be 00:11:46.260 |
an issue generally speaking um the issue tends to be more if you accidentally install something 00:11:51.520 |
into your system python um yeah but the idea is that you want to feel like you can blow 00:11:59.000 |
away your member forge mini condor or whatever directory anytime and recreate it um yeah 00:12:06.920 |
because you don't want to be in a situation where things work but you don't know why they 00:12:12.360 |
work and you don't know if you can get them back to a working state again that's really 00:12:16.320 |
unsustainable um but yeah the short answer is you can just type pip uninstall to remove 00:12:22.480 |
a module thank you what about when when it says that some packages are going to be downgraded 00:12:35.720 |
that's okay yeah that's okay if it's going to downgrade packages i mean i did i'd kind 00:12:40.400 |
of check how much it's been downgraded but sometimes it'll be like one or two you know 00:12:46.640 |
you know zero point zero two zero point zero point zero two difference in version or something 00:12:51.980 |
it's not going to matter i mean if it's downloading it or downgrading it by a lot that might mean 00:12:57.560 |
that something wrong is happening um but yeah that's not necessarily a problem uh okay so 00:13:08.840 |
and i think like pip almost never downgrades things condor does sometimes um so let's try 00:13:20.160 |
um so the thing we learned yesterday is we can go pip install and if you want to upgrade 00:13:26.000 |
something it's minus u and there was this one extra thing we typed which was minus minus 00:13:30.800 |
user and so so the key thing that does is it puts it into our home directory um and 00:13:41.480 |
so in our home directory the place it put it is the dot local folder um so what the 00:13:56.280 |
so the thing we wanted to do was to make sure that the next time we start up our computer 00:14:02.320 |
we want that that dot local um to be there um so that means we have to move it to persistent 00:14:13.480 |
storage so that's easy enough to do by using move so we can move it into our persistent 00:14:20.880 |
storage um and you know what i would be inclined to do actually is to create a folder in there 00:14:30.160 |
just for the stuff that we're where you the things in storage that we're using specifically 00:14:34.640 |
for like configuration like this so um i was just about to delete this line when i realized 00:14:38.720 |
i haven't taught you folks how to delete lines yet so to delete the um everything left of 00:14:43.880 |
the cursor it's control u and to delete everything right of the cursor it's control k so hit 00:14:48.920 |
control u um and so let's create a directory for this so we'll go make a directory in storage 00:15:00.520 |
which we'll call like i don't know cfg for our configuration stuff okay and so then we'll 00:15:06.120 |
make a sim link from oh so then we're going to move okay so we're going to move our dot 00:15:12.720 |
local folder into there now do you remember the way to say the last thing i typed on the 00:15:20.040 |
last line is um is exclamation mark dollar so i can say move dot local to slash storage 00:15:32.760 |
slash config by doing move dot local and then exclamation mark dollar and you can see it's 00:15:39.480 |
filtered out here to show me so it's a quick shortcut and then so i want to sim link 00:15:46.280 |
that back again into this directory so create a sim link from slash storage config 00:15:56.280 |
dot local to here and here is the default right so i don't have to say to here 00:16:05.880 |
and so you can see we've never seen core dot local and it's not a real normal 00:16:11.960 |
folder it's just a pointer to this other place but i it acts like a normal folder 00:16:16.520 |
as you can see and so that should mean that i can import fast core 00:16:38.920 |
one four three control d twice to exit okay everybody happy with that so far 00:16:49.480 |
jimmy i had a doubt so which part was the dot local actually there like in which folder was 00:16:57.960 |
not the dot local is in my home directory and so see how here i typed cd so cd takes you back to 00:17:05.480 |
your home directory and you can tell where i am because it's the bit before the pound sign 00:17:10.040 |
and tilde means in my home directory basically everything it creates for like kind of your 00:17:16.840 |
configuration will be somewhere in your home directory so in that um what we're talking about 00:17:22.760 |
jimmy i noticed that when doing cd backslash what cd space backslash probably means cd space forward 00:17:30.760 |
slash forward slash that one um that went to a different place to the home where it goes cd 00:17:39.400 |
space tilde yeah so cd space slash takes you to the root directory okay so that's the top level 00:17:49.720 |
where i'll cd enter or cd tilde same thing takes you to your home directory so if i go to cd 00:17:57.080 |
slash and i type print working directory it says oh you're in slash and if i just type cd and say 00:18:02.680 |
print working directory it says oh you're you're in your home and since we're root that's our home 00:18:08.520 |
normally the home directory is slash home slash username roots a special case 00:18:15.480 |
does that answer that question yep thank you just a quick question jeremy like in terms of starting 00:18:21.400 |
your um the instance that you just started is that uh without an image right i used the fastai image 00:18:29.720 |
um but i used the trick that we learned yesterday which is to go to advanced and then delete the 00:18:36.920 |
contents of the git workspace so i clicked on create i clicked on fastai make sure you do 00:18:45.160 |
choose the fastai image because it's got all the stuff we need to make this stuff work but i then 00:18:49.480 |
clicked advanced options and deleted that and the only impact of that is it just it doesn't 00:18:54.600 |
put the contents of this git repo into your notebooks directory that's the only thing that's 00:19:00.440 |
okay so i could try all these things that you're doing right now without because i do have a notebook 00:19:06.360 |
already created but it's with the fastbook document yeah so you could like just delete them you know 00:19:11.640 |
uh you know just rm star.ipynb or or just ignore them or yeah absolutely okay cool thank you no 00:19:21.720 |
worries um jeremy can i ask one more question anytime um the uh so now you've you've the 00:19:30.600 |
dot local that you've created now let's say you uh so it's on your storage so it's persistent 00:19:37.880 |
now you reboot the system and you don't download another you pip install something else and you 00:19:43.800 |
move that new dot local that it's going to create isn't that going to overwrite what's in your 00:19:47.560 |
storage yeah so we haven't got to that bit yet so we're at this point we've got something that's 00:19:51.960 |
working just for this instance but it's not going to work for a future one so we need to um we need 00:19:57.560 |
to what we're going to do mark is we're going to create a little python script that um that is 00:20:06.440 |
before it starts the server before it starts jupiter in the server it's sim links it creates 00:20:11.800 |
this sim link and then in the future if i type pip install minus minus user it'll store it in 00:20:17.800 |
dot local slash bla that's dot local will already be pointing at slash storage so it'll actually 00:20:23.880 |
stick it in slash storage and that's that's the secret trick i got it okay thank you cool and 00:20:30.040 |
mark i think you were the one who said on the forum about like are we sure this is a good idea 00:20:34.600 |
was that was that you and yeah that's me i don't want to i don't want to make it all about me but 00:20:39.000 |
i've had so many well i want to make it about you because like you you're at my target demographic 00:20:44.360 |
here is people who aren't particularly confident at the show so no not at all it's just um you're 00:20:51.640 |
the one person who was brave enough to join in i think despite having less um experience at the 00:20:56.600 |
terminal so i actually want you to be particularly happy to interrupt anytime something's not clear 00:21:03.160 |
yeah no i i've started this course a few times and every time the problem is always the thing 00:21:07.000 |
that always makes me stop is this stuff yeah and i end up like getting conflicts and i remember 00:21:12.520 |
there was an old version of i think it was paper space i can't remember that you were recommending 00:21:15.960 |
and it kept crashing and i kept losing work and yeah so i guess i'm a little paranoid about 00:21:21.320 |
creating things that are going to create yeah so to be clear mark i don't feel like we've had 00:21:26.440 |
a great solution for running fast ai cheaply and easily until now so the reason you've had 00:21:34.600 |
problems before is that like there wasn't a great solution before so so this is the first time i'm 00:21:41.640 |
actually saying to you i really do think this is going to work and so anytime something goes wrong 00:21:46.520 |
like feel free to like share your screen or anything because that debugging process will 00:21:52.440 |
also be useful so i'd say for now you know suspend disbelief give it a go and you know 00:21:58.920 |
if it all falls apart blame me and i will happily fix it and so it goes for anybody 00:22:05.400 |
as long as you're roughly following along with these depths if you do something totally different 00:22:11.080 |
maybe i won't be so patient okay so so look at what we did here we did two things we first 00:22:21.240 |
of all moved out local to storage and then we sim linked it back now we're not going to have to do 00:22:26.760 |
that move ever again right with that that was just enough to kind of create a dot local slash 00:22:32.760 |
storage slash config dot local so all we need to do next time we um next time we uh create an 00:22:42.520 |
instance is to create the sim link um like so so um let's do it like if there's something so simple 00:22:55.240 |
because i said i'm going to show you how i would do things for something so simple i would actually 00:22:58.840 |
create a bash script for this um and this is where things are going to get particularly interesting 00:23:10.280 |
because um well okay i'm going to show you the proper way to do this and i'm also going to show 00:23:19.880 |
you the slightly improper way to do this i'm going to show you how to use vim which is actually a 00:23:25.000 |
highly recommended editor that works in your terminal but i'm also going to show you a trick 00:23:29.400 |
for how you can use the jupyter text editor so jupyter has an in browser text editor 00:23:36.600 |
which currently we can't really use because it's it's pointing at slash notebooks 00:23:41.720 |
so how would we change stuff how would we edit stuff that's in slash storage 00:23:47.960 |
but what we could do is if we see data slash notebooks and then we create a sim link 00:23:55.000 |
from excuse me jerry yeah um just letting you know on my screen at least uh your cursor is just 00:24:06.120 |
cut off from the bottom of the screen like so like i need to like make the uh browser a little bit 00:24:13.080 |
sounds like jupyter is not quite showing this properly so you can see it now cool thank you 00:24:23.240 |
thanks let me know um so if i sim link slash storage into slash notebooks 00:24:34.760 |
then what should happen there we go is it appears here because this is showing me the contents of 00:24:41.880 |
slash notebooks so um that would be one simple way to um create a script here would be i could click 00:24:58.680 |
and we've got a text file and so now we could um copy and paste our sim link 00:25:13.560 |
so maybe copy let's see copy oh that's annoying 00:25:31.960 |
can't copy stuff from the terminal oh you're writing scoundrel 00:25:39.000 |
i just did it with ctrl c and ctrl b yeah i oh it's because i'm on a mac now i have to press 00:25:50.760 |
command not control right thank you okay um and um you need to make sure you're in your 00:26:00.520 |
home directory for this to work so cd okay um and to run this as a script you have to 00:26:09.960 |
tell it it's a script um and the reason why it doesn't matter too much but the official 00:26:16.120 |
the the the kind of correct way to do that is to you first of all say hash bang that means the 00:26:22.760 |
first line of the file in linux and mac tells it what program to run it with and we want to run it 00:26:30.200 |
with bash and you're meant to do it like this for slightly obscure reasons slash user slash bin slash 00:26:40.440 |
and bash that will run this script with bash okay file save 00:26:49.400 |
um the slightly less correct way to do it is you could just say which bash 00:26:58.200 |
to find out where bash is and it's actually slash bin slash bash and you know you can also type 00:27:09.080 |
this that would also work so that says when to linux or mac when you run this file 00:27:16.440 |
run it using this program you're sorry run it using this program okay so file save 00:27:23.880 |
all right so let's rename that and so in um paper space um the special file called prerun.sh is run 00:27:38.440 |
when it starts a new instance now you might remember that you know um in fact let's let's 00:27:47.880 |
it's good to before you just go ahead and start an instance let's try to like run it and see if it 00:27:51.880 |
works so if i type dot slash pre run dot sh and press enter it doesn't work and so the reason 00:28:02.120 |
why it doesn't work hopefully you're starting to remember now is that we need we need permissions 00:28:10.120 |
to be set correctly and in particular we're missing the x here the execute permission 00:28:17.000 |
and so in the past lessons i've shown you you can type chmod u plus x to add the execute permission 00:28:26.520 |
to a file like so um but i also actually kind of lied i don't normally use that way of setting 00:28:38.360 |
permissions normally i set all the permissions at once um i would actually normally type this i would 00:28:45.640 |
7 5 5 pre run dot sh now let me explain why 7 5 5 um and the reason i did it the other way before 00:28:54.520 |
is it required less explanation um 7 5 5 is not the number 755 it's actually three separate numbers 00:29:02.760 |
the number seven the number five and the number five it says these are permissions for the user 00:29:07.240 |
these are permissions for the group these are permissions for everybody and then um uh the 00:29:31.480 |
so uh actually it's not quite 555 that i want but that's okay um so basically for each one it's 00:29:55.960 |
going to add up three numbers a one a two and a five a one if it's executable a two if it's 00:30:01.160 |
writable and a four if it's readable so seven means readable and writable and executable for 00:30:09.720 |
the user four means readable for the group and then this four means readable for everybody 00:30:20.200 |
so if i check this now you can see it's got okay so this r w x is four plus two plus one equals seven 00:30:29.560 |
uh dash dash that's four plus zero plus zero dash dash four plus zero plus zero so this these 00:30:36.280 |
permissions are seven four four um so that's yeah slightly weird if you've done stuff with 00:30:44.440 |
bit flags in your programming before it'll look pretty familiar and then if you haven't it might 00:30:48.520 |
look weird um this kind of thing does come up quite a lot actually in programming as a 00:30:53.400 |
surprising amount so it's probably worth getting familiar with the idea of bit flags uh so that 00:31:01.240 |
now should um be able to be runnable and it is now runnable and so it's good we ran it because 00:31:10.280 |
it tells us that oh you can't create a symbolic link because it already exists now um i'm not sure 00:31:18.040 |
before jupiter starts if this directory will be here or not um so it would probably be a good 00:31:27.400 |
idea to assume it does um so to avoid that we could first of all go remove recursively and forcefully 00:31:41.640 |
the any dot local directory or file that exists um and so if i now save that 00:31:58.520 |
okay it's worked so that's good so we should now be able to 00:32:24.600 |
i'm not really doing anything with the gpu at the moment so i'm not going to 00:32:30.600 |
spend their money unnecessarily so let's just create 00:32:47.320 |
there we go um okay so that's uh gonna go ahead and start 00:32:56.520 |
so that's um that's done that bit from scratch um so let's now do our 00:33:07.240 |
our keys from scratch as well um so and you know i would probably not do that ssh 00:33:16.120 |
keygen thing in real life so let's let's do it all the way i would do it so i would just say 00:33:19.640 |
make dot ssh that's where our keys are going to go okay um and then upload my keys whoops 00:33:37.160 |
okay there they are um and so then let's cd to dot ssh 00:33:49.240 |
and move i put them in storage so so storage id rsa star into here 00:33:57.480 |
whoops oh crap i just messed it up now i'd have to upload them again sorry 00:34:17.320 |
okay so there they are um in fact let's do la because that tells us dot which is the 00:34:28.360 |
permissions on this directory okay so the dot ssh directory nobody else should be able to access it 00:34:34.520 |
so if i go ch mod 700 700 0 that means four plus two plus one so all permissions for me the user 00:34:44.360 |
and no permissions for anybody else on the directory okay and then um actually 00:34:52.520 |
well and then for the id rsa it's just readable and writable say 600 for my private key 00:35:02.920 |
and then for the public key it's readable and writable by me but only readable by everybody else 00:35:14.040 |
so there we've got it okay so this is what 700 permissions look like this is what 600 00:35:27.880 |
permissions look like and this is what 6 4 4 permissions look like and after a while actually 00:35:33.560 |
you start getting used to the idea of like oh 6 4 4 anything that you can read and write and 00:35:38.680 |
other people can read you know 700 any directory that you can fully access 600 anything that only 00:35:44.760 |
you can read and write they kind of become like standard little concepts in your head 00:35:50.600 |
so at that point we should be able to test this now 00:36:07.320 |
and i've successfully authenticated now if that doesn't work for you it's almost always because 00:36:12.200 |
of permissions but you can get a lot more information by running ssh verbosely by typing 00:36:18.280 |
minus v and it's quite cute the more v's you type the more verbose it is 00:36:23.160 |
so very very very verbose um okay and it'll tell you all the stuff it's doing 00:36:35.960 |
hopefully you won't be too surprised to hear that we want to do exactly the same thing with 00:36:43.160 |
our .ssh folder which is we want to move it into our persistent storage and then link it back again 00:36:59.560 |
and then sim link it back again now rather than manually doing that we could just go into our 00:37:29.800 |
you can see my ssh is now sim linked and if i test it so i pressed 00:37:45.080 |
control r git gets me back the last thing i typed with git in it yep it still works 00:37:54.920 |
okay and this notebook has hopefully finished starting yes it has 00:38:00.120 |
and i'll just quickly use the paper space ide just because i'm testing and we can test 00:38:09.640 |
yep so this is a brand new instance i started in another tab and my .local 00:38:15.480 |
has successfully appeared there so we can see that our pre-launch thingy is working 00:38:21.480 |
okay i think that's everything that i wanted to show today does anybody have any 00:38:34.120 |
questions before i go sorry about the slow start 00:38:43.400 |
one quick question yeah um jeremy uh you've you can see a file structure there on the left hand 00:38:50.520 |
side um i i see just nothing that's yeah so this is my yeah so my persistent storage already had 00:38:58.680 |
stuff in it so i've just been deleting stuff okay the reason we see storage is because of 00:39:06.600 |
that sim link i created earlier um so if i type history part crap 00:39:12.600 |
when you start the instance when you open the left hand tab you will be looking at your notebooks 00:39:25.080 |
directory exactly that is your notebooks directory and so you might have missed it but earlier on 00:39:32.360 |
what i did was i sim linked my slash storage directory into my notebooks directory 00:39:39.800 |
so that i could edit and so if you missed that bit just watch the video and you'll see it happen 00:39:46.600 |
but yeah it was this is this line here ln minus s slash storage and i put it into notebooks 00:39:54.200 |
otherwise i was going to have to show you how to use vim but i might show you how to use vim 00:39:58.840 |
next time but this way we can use our our editor great and the the thing that makes it work across 00:40:06.280 |
new servers is that the pre-run file is in the storage um the pre-run file is is special um so 00:40:17.400 |
you might have noticed that when you go to the advanced options when you start the instance it 00:40:23.640 |
says what program should it run when it starts and it's a default it runs a program called run.sh 00:40:29.320 |
and if you look at that run.sh it says here run the pre-run.sh so that it has to be that exact 00:40:37.400 |
place and that exact name it's a special file this is a paper space specific thing okay so as long as 00:40:45.560 |
pre-run is in storage with that exact format it will be across servers exactly right yeah it'll 00:40:52.040 |
be across servers because it's in slash storage and it will be run because the run.sh file runs 00:40:58.440 |
it um as you know um yeah exactly so jeremy just a quick question about pre-run did did you created 00:41:08.600 |
that right i created the pre-run.sh file it was not there yeah so in bash this if here actually 00:41:15.720 |
says if minus f is this file exists then run it that's what that bash means and so paper space 00:41:24.440 |
that you know i said to paper space could you please add that to our to our image and so 00:41:29.960 |
everybody who uses the the fastai image will will have this and so if you create a pre-run.sh 00:41:38.440 |
in here then it's going to run it right so we would be creating that it won't be pre correct 00:41:45.080 |
the way i created it and again go back and watch the video if you if you missed this and you want 00:41:49.000 |
to see it again i double clicked on storage and then i clicked on plus and i clicked on text file 00:41:55.560 |
and then that created a text file called untitled.txt which i then 00:42:00.200 |
right clicked on and i said rename and i renamed it to pre-run.sh 00:42:03.880 |
right there was one before like i saw the dot back so i did the dot back one yeah don't worry 00:42:10.840 |
that that's so that's the one i moved out of the way that's my actual one that i went for myself 00:42:15.240 |
i saw that already and i was like okay did it did the system created for you yeah yeah that 00:42:19.560 |
was just trying to get mine out of the way so it didn't make me cheat 00:42:23.400 |
all right so then the last step of course we have to do is to stop our server 00:42:32.520 |
tell me one quick question yeah how do we ensure that we are not disturbing system python many 00:42:44.120 |
times have i when i'm installing in my system i somehow i i mess up things um have you watched 00:42:51.080 |
the previous three uh three walkthroughs last one i missed okay so watch that uh where we basically 00:43:00.520 |
answer that question i believe but if you have any if that doesn't answer your question then please 00:43:05.240 |
ask next time thank you thank you no worries all right thanks all bye thanks thank you everyone