WEBVTT - This file was automatically generated by VIMEO

0
00:00:07.760 --> 00:00:12.740
Hi. In this video we will learn what are the options to share our notebooks.

1
00:00:14.950 --> 00:00:18.210
We covered already some of them and some of them are obvious,

2
00:00:18.550 --> 00:00:20.450
but let's list them first.

3
00:00:21.040 --> 00:00:25.860
For options is sharing just the output without the possibility of executing

4
00:00:25.860 --> 00:00:30.280
code. We can share the notebook via a GitHub repository.

5
00:00:31.030 --> 00:00:34.000
When you open a notebook from GitHub, we can see its output,

6
00:00:34.220 --> 00:00:36.760
but it is not rendering, uh, Plotly charts,

7
00:00:36.760 --> 00:00:38.760
table of contents or Jupyter Widgets.

8
00:00:42.530 --> 00:00:43.510
Let us open this one.

9
00:00:49.860 --> 00:00:52.800
We can see the code, we can see the data frames

10
00:01:01.680 --> 00:01:03.450
mark down latex as well,

11
00:01:04.870 --> 00:01:06.730
but the plotly chart is missing.

12
00:01:12.010 --> 00:01:16.940
Then we can share our notebooks in the form of the exported files like H T

13
00:01:17.100 --> 00:01:18.820
M L or P D F and so on.

14
00:01:19.600 --> 00:01:23.960
We can make them available as Val dashboards, uh,

15
00:01:24.280 --> 00:01:25.113
deployed on a server.

16
00:01:26.330 --> 00:01:31.020
Then we can share our notebook via n b Weaver. We can try it now,

17
00:01:31.560 --> 00:01:34.660
uh, but it is not rendering table of contents, uh,

18
00:01:35.120 --> 00:01:37.420
but plotly charts are fine. We

19
00:01:48.530 --> 00:01:53.250
just copy the link of our notebook in the GitHub and paste it to the n b

20
00:01:53.250 --> 00:01:54.083
weaver

21
00:02:00.710 --> 00:02:02.850
and the portal charts are generated nicely.

22
00:02:06.870 --> 00:02:10.920
Next options cover the execution of the notebook as well. Uh,

23
00:02:11.020 --> 00:02:12.120
not only the outputs,

24
00:02:13.200 --> 00:02:17.940
we can provide the notebook by itself or in arpo with exported conda or

25
00:02:18.010 --> 00:02:18.843
PEEP environment.

26
00:02:19.600 --> 00:02:24.220
So the user will use it on his own Jupyter Server where he

27
00:02:24.290 --> 00:02:27.740
recreates the environment and runs the notebook. Here,

28
00:02:27.960 --> 00:02:30.900
the system level dependencies might cause issues.

29
00:02:32.350 --> 00:02:37.240
Then we can, uh, use, uh, Docker image to handle the environment rules. Uh,

30
00:02:37.240 --> 00:02:42.050
GitHub repo with this Docker solves the system level dependencies.

31
00:02:42.050 --> 00:02:45.020
Basically. Then we can use Bender.

32
00:02:46.380 --> 00:02:50.400
Bender builds the Docker image by itself from a GitHub repository.

33
00:02:51.180 --> 00:02:55.080
One thing what is needed is a text file like yaml, uh,

34
00:02:55.080 --> 00:02:58.520
for installing the dependencies. Uh, we can try. Now,

35
00:03:01.470 --> 00:03:03.550
I have already prepared the repository,

36
00:03:03.840 --> 00:03:08.420
which has our notebook configuration, YAML for the notebook,

37
00:03:09.040 --> 00:03:12.510
our data files and environment YAML file.

38
00:03:13.350 --> 00:03:17.600
This is the file which uses vendor to create the environment with our Python

39
00:03:17.720 --> 00:03:19.200
packages and its versions.

40
00:03:21.610 --> 00:03:26.490
I have created this requirements file with this command conduct and export to

41
00:03:26.490 --> 00:03:27.570
environment ofl.

42
00:03:35.630 --> 00:03:39.250
Now, we just copied the link and paste it binder

43
00:03:42.150 --> 00:03:42.983
and click launch.

44
00:04:09.290 --> 00:04:14.170
Then the image will be built. We can see the logs here, and after that,

45
00:04:14.350 --> 00:04:18.890
uh, the container will be launched. In our case, it'll be around 10 minutes.

46
00:04:20.290 --> 00:04:22.990
Uh, you can access the container via the same link,

47
00:04:23.120 --> 00:04:25.510
which you will paste into the middle website.

48
00:04:26.530 --> 00:04:29.110
The containers are after some time destroyed,

49
00:04:29.890 --> 00:04:34.030
but next time if you pass the same link, the image creation tab will be skipped,

50
00:04:34.490 --> 00:04:36.070
so it'll be much faster.

51
00:04:52.550 --> 00:04:54.490
One thing I would like to mention, uh,

52
00:04:54.560 --> 00:04:58.770
that I replaced the R P Y two package, uh,

53
00:04:58.770 --> 00:05:02.410
from PIP to conduct. A reason for this was that during the building,

54
00:05:02.510 --> 00:05:06.290
the image being there showed me an error, probably because of our installation.

55
00:05:06.430 --> 00:05:07.290
And this helped.

56
00:05:09.500 --> 00:05:13.050
And when you will try this by yourself. Uh,

57
00:05:13.060 --> 00:05:17.010
check the Anaconda base environment, uh, this package version,

58
00:05:18.410 --> 00:05:22.410
add it to the conduct dependencies and remove, uh,

59
00:05:22.470 --> 00:05:25.010
the R p I two package from the PIP dependencies.

60
00:05:56.260 --> 00:05:56.900
Okay, our,

61
00:05:56.900 --> 00:06:01.520
our container has started and now we are redirected to our Jupiter lab.

62
00:06:10.610 --> 00:06:12.310
We can try, if everything works.

63
00:06:26.070 --> 00:06:26.903
It seems good.

64
00:06:28.470 --> 00:06:33.010
Now the execution of this R cell will take some time because, uh,

65
00:06:33.030 --> 00:06:35.130
it has to install the Gigi Pro two package

66
00:06:37.190 --> 00:06:39.060
maybe around five to 10 minutes.

67
00:06:43.750 --> 00:06:48.690
But after that, the execution of the notebook, uh, should, uh, go perfectly.

68
00:06:54.290 --> 00:06:57.950
We did a lot of things in this module. I hope you enjoyed it.

69
00:06:58.250 --> 00:07:02.090
And to summarize it, we learned how to work with the notebook,

70
00:07:02.390 --> 00:07:05.610
how to execute code cells, how to debug code.

71
00:07:07.000 --> 00:07:09.060
We learned how to work with the kernel,

72
00:07:09.840 --> 00:07:13.060
how to execute R and Python code in one notebook.

73
00:07:14.090 --> 00:07:19.030
We learned also how to execute and export the notebook in various ways from the

74
00:07:19.210 --> 00:07:24.020
UI terminal and Python. We created new Anaconda environment.

75
00:07:25.550 --> 00:07:30.170
We learned how to turn the notebook into a dashboard with voa.

76
00:07:31.380 --> 00:07:34.480
We played a little bit with the interactive widgets.

77
00:07:35.710 --> 00:07:39.850
We also learned how to parameterize the notebook and how to share our notebooks.

78
00:07:40.980 --> 00:07:43.440
And in addition to the Jupyter Knowhow,

79
00:07:43.660 --> 00:07:46.440
we also learned the basics of linear regression.

80
00:07:47.420 --> 00:07:51.960
We have touched also libraries like Pandas Stick, learn, t, and plotly.

81
00:07:53.790 --> 00:07:54.650
In our next video,

82
00:07:55.190 --> 00:07:58.810
we will start our new module focused on Jupiter Lab.
