Mercurial > hg > Members > aka > jupyter_CbC_kernel
annotate README.md @ 63:dcc9eecfc666
Updated README
author | Brendan Rius <brendan.rius@gmail.com> |
---|---|
date | Thu, 10 Aug 2017 17:29:41 +0200 |
parents | 775e15a2e2de |
children | 37ded774d876 |
rev | line source |
---|---|
0 | 1 # Minimal C kernel for Jupyter |
2 | |
16
63084d5da27c
Update README.md after #2 and to move the requirements to the correct section
Brendan Rius <brendan@omixy.com>
parents:
13
diff
changeset
|
3 ## Use with Docker (recommended) |
13 | 4 |
5 * `docker pull brendanrius/jupyter-c-kernel` | |
62 | 6 * `docker run -p 8888:8888 brendanrius/jupyter-c-kernel` |
7 * Copy the given URL containing the token, and browse to it. | |
13 | 8 |
16
63084d5da27c
Update README.md after #2 and to move the requirements to the correct section
Brendan Rius <brendan@omixy.com>
parents:
13
diff
changeset
|
9 ## Manual installation |
63084d5da27c
Update README.md after #2 and to move the requirements to the correct section
Brendan Rius <brendan@omixy.com>
parents:
13
diff
changeset
|
10 |
17 | 11 * Make sure you have the following requirements installed: |
12 * gcc | |
13 * jupyter | |
31 | 14 * python 3 |
17 | 15 * pip |
26
06e1c3c43532
Add alternative installation using wget and sh
Manoel Vilela <manoel_vilela@engineer.com>
parents:
18
diff
changeset
|
16 |
06e1c3c43532
Add alternative installation using wget and sh
Manoel Vilela <manoel_vilela@engineer.com>
parents:
18
diff
changeset
|
17 ### Step-by-step: |
10 | 18 * `pip install jupyter-c-kernel` |
58
8a8a9952c887
Change install procedure
Brendan Rius <brendan.rius@gmail.com>
parents:
47
diff
changeset
|
19 * `install_c_kernel` |
18 | 20 * `jupyter-notebook`. Enjoy! |
6 | 21 |
22 ## Example of notebook | |
23 | |
24 ![Example of notebook](example-notebook.png?raw=true "Example of notebook") | |
19 | 25 |
63 | 26 ## Custom compilation flags |
27 | |
28 You can use custom compilation flags like so: | |
29 | |
30 ![Custom compulation flag](custom_flags.png?raw=true "Example of notebook using custom compilation flags") | |
31 | |
32 Here, the `-lm` flag is passed so you can use the math library. | |
33 | |
32
fae3b8f7cbfb
Add contributing guidelines in README
Brendan Rius <brendan@omixy.com>
parents:
31
diff
changeset
|
34 ## Contributing |
fae3b8f7cbfb
Add contributing guidelines in README
Brendan Rius <brendan@omixy.com>
parents:
31
diff
changeset
|
35 |
46
59cf2351e933
Add instruction on how to live-edit the code
Brendan Rius <brendan@omixy.com>
parents:
42
diff
changeset
|
36 The docker image installs the kernel in editable mode, meaning that you can |
59cf2351e933
Add instruction on how to live-edit the code
Brendan Rius <brendan@omixy.com>
parents:
42
diff
changeset
|
37 change the code in real-time in Docker. For that, just run the docker box like |
59cf2351e933
Add instruction on how to live-edit the code
Brendan Rius <brendan@omixy.com>
parents:
42
diff
changeset
|
38 that: |
59cf2351e933
Add instruction on how to live-edit the code
Brendan Rius <brendan@omixy.com>
parents:
42
diff
changeset
|
39 |
59cf2351e933
Add instruction on how to live-edit the code
Brendan Rius <brendan@omixy.com>
parents:
42
diff
changeset
|
40 ```bash |
59cf2351e933
Add instruction on how to live-edit the code
Brendan Rius <brendan@omixy.com>
parents:
42
diff
changeset
|
41 git clone https://github.com/brendan-rius/jupyter-c-kernel.git |
59cf2351e933
Add instruction on how to live-edit the code
Brendan Rius <brendan@omixy.com>
parents:
42
diff
changeset
|
42 cd jupyter-c-kernel |
47 | 43 docker run -v $(pwd):/jupyter/jupyter_c_kernel/ -p 8888:8888 brendanrius/jupyter-c-kernel |
46
59cf2351e933
Add instruction on how to live-edit the code
Brendan Rius <brendan@omixy.com>
parents:
42
diff
changeset
|
44 ``` |
59cf2351e933
Add instruction on how to live-edit the code
Brendan Rius <brendan@omixy.com>
parents:
42
diff
changeset
|
45 |
59cf2351e933
Add instruction on how to live-edit the code
Brendan Rius <brendan@omixy.com>
parents:
42
diff
changeset
|
46 This clones the source, run the kernel, and binds the current folder (the one |
59cf2351e933
Add instruction on how to live-edit the code
Brendan Rius <brendan@omixy.com>
parents:
42
diff
changeset
|
47 you just cloned) to eh corresponding folder in Docker. |
59cf2351e933
Add instruction on how to live-edit the code
Brendan Rius <brendan@omixy.com>
parents:
42
diff
changeset
|
48 Now, if you change the source, it will be reflected in [http://localhost:8888](http://localhost:8888) |
59cf2351e933
Add instruction on how to live-edit the code
Brendan Rius <brendan@omixy.com>
parents:
42
diff
changeset
|
49 instantly. Do not forget to click "restart" the kernel on the page as it does |
59cf2351e933
Add instruction on how to live-edit the code
Brendan Rius <brendan@omixy.com>
parents:
42
diff
changeset
|
50 not auto-restart. |
59cf2351e933
Add instruction on how to live-edit the code
Brendan Rius <brendan@omixy.com>
parents:
42
diff
changeset
|
51 |
59cf2351e933
Add instruction on how to live-edit the code
Brendan Rius <brendan@omixy.com>
parents:
42
diff
changeset
|
52 ### Version control |
59cf2351e933
Add instruction on how to live-edit the code
Brendan Rius <brendan@omixy.com>
parents:
42
diff
changeset
|
53 |
41 | 54 Create branches named `issue-X` where `X` is the number of the issue. |
32
fae3b8f7cbfb
Add contributing guidelines in README
Brendan Rius <brendan@omixy.com>
parents:
31
diff
changeset
|
55 Rebase instead of merge. |
fae3b8f7cbfb
Add contributing guidelines in README
Brendan Rius <brendan@omixy.com>
parents:
31
diff
changeset
|
56 |
19 | 57 ## License |
58 | |
41 | 59 [MIT](LICENSE.txt) |