Skip to content

Commit

Permalink
support jupyter notebook support
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhigang Song committed Feb 28, 2024
1 parent dfa5d68 commit 6d8a2cd
Show file tree
Hide file tree
Showing 11 changed files with 454 additions and 8,955 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
# uses: lhotari/action-upterm@v1

- name: Build static site
run: docker run -v `pwd`:/blog sidgwick/jkelly:latest
run: docker run -v `pwd`:/blog sidgwick/jekyll:latest

- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v2
Expand Down
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
FROM ubuntu:latest
FROM ruby:3.1-slim-bullseye as jekyll
RUN apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qy build-essential ruby ruby-dev graphviz git \
&& apt-get clean \
&& rm -rf /var/lib/apt
&& DEBIAN_FRONTEND=noninteractive apt-get install -qy build-essential ruby ruby-dev graphviz git python3-notebook jupyter-nbconvert \
&& apt-get clean \
&& rm -rf /var/lib/apt

RUN gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/ \
&& gem install jekyll \
&& gem update --system
&& gem install jekyll \
&& gem update --system

WORKDIR /blog
ENTRYPOINT ["/bin/bash", "bootstrap.sh"]
# ENTRYPOINT ["bin/bash"]
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ source "https://gems.ruby-china.com/"
#gem "rexml", ">= 3.2.5"
gem "jekyll-text-theme"
gem "tzinfo-data"
# gem "jekyll-jupyter-notebook"

group :jekyll_plugins do
gem 'jekyll-graphviz', :git => 'https://github.com/sidgwick/jekyll-graphviz.git'
gem "jekyll-jupyter-notebook", :git => "https://github.com/sidgwick/jekyll-jupyter-notebook"
# gem "jekyll-jupyter-notebook", :path => "./_drafts/jekyll-jupyter-notebook"
# gem 'jekyll-graphviz', :path => "./jekyll-graphviz"
end
143 changes: 105 additions & 38 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,75 @@ GIT
specs:
jekyll-graphviz (0.1.0)

GIT
remote: https://github.com/sidgwick/jekyll-jupyter-notebook
revision: 0805b888e7ed45e80495c0aefa2cb0a854f2a102
specs:
jekyll-jupyter-notebook (0.0.6)
jekyll

GEM
remote: https://gems.ruby-china.com/
specs:
activesupport (7.0.2.3)
activesupport (7.1.3.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
base64 (0.2.0)
bigdecimal (3.1.6)
colorator (1.1.0)
concurrent-ruby (1.1.10)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
drb (2.2.0)
ruby2_keywords
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.15.5)
ffi (1.16.3)
forwardable-extended (2.6.0)
gemoji (3.0.1)
html-pipeline (2.14.1)
gemoji (4.1.0)
google-protobuf (3.25.3)
google-protobuf (3.25.3-aarch64-linux)
google-protobuf (3.25.3-arm64-darwin)
google-protobuf (3.25.3-x86-linux)
google-protobuf (3.25.3-x86_64-darwin)
google-protobuf (3.25.3-x86_64-linux)
html-pipeline (2.14.3)
activesupport (>= 2)
nokogiri (>= 1.4)
http_parser.rb (0.8.0)
i18n (1.10.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
jekyll (4.2.2)
jekyll (4.3.3)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (~> 2.0)
jekyll-sass-converter (>= 2.0, < 4.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.3)
kramdown (~> 2.3, >= 2.3.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.4.0)
mercenary (>= 0.3.6, < 0.5)
pathutil (~> 0.9)
rouge (~> 3.0)
rouge (>= 3.0, < 5.0)
safe_yaml (~> 1.0)
terminal-table (~> 2.0)
jekyll-feed (0.16.0)
terminal-table (>= 1.8, < 4.0)
webrick (~> 1.7)
jekyll-feed (0.17.0)
jekyll (>= 3.7, < 5.0)
jekyll-paginate (1.1.0)
jekyll-sass-converter (2.2.0)
sassc (> 2.0.1, < 3.0)
jekyll-sass-converter (3.0.0)
sass-embedded (~> 1.54)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
jekyll-text-theme (2.2.6)
Expand All @@ -59,50 +83,93 @@ GEM
jemoji (~> 0.8)
jekyll-watch (2.2.1)
listen (~> 3.0)
jemoji (0.12.0)
gemoji (~> 3.0)
jemoji (0.13.0)
gemoji (>= 3, < 5)
html-pipeline (~> 2.2)
jekyll (>= 3.0, < 5.0)
kramdown (2.3.2)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.7.1)
liquid (4.0.4)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
minitest (5.15.0)
nokogiri (1.13.3-x86_64-linux)
minitest (5.22.2)
mutex_m (0.2.0)
nokogiri (1.16.2-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.2-arm-linux)
racc (~> 1.4)
nokogiri (1.16.2-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.2-x86-linux)
racc (~> 1.4)
nokogiri (1.16.2-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.2-x86_64-linux)
racc (~> 1.4)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.6)
racc (1.6.0)
rb-fsevent (0.11.1)
public_suffix (5.0.4)
racc (1.7.3)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (3.28.0)
rexml (3.2.6)
rouge (4.2.0)
ruby2_keywords (0.0.5)
safe_yaml (1.0.5)
sassc (2.4.0)
ffi (~> 1.9)
terminal-table (2.0.0)
unicode-display_width (~> 1.1, >= 1.1.1)
tzinfo (2.0.4)
sass-embedded (1.71.1-aarch64-linux-gnu)
google-protobuf (~> 3.25)
sass-embedded (1.71.1-aarch64-linux-musl)
google-protobuf (~> 3.25)
sass-embedded (1.71.1-arm-linux-gnueabihf)
google-protobuf (~> 3.25)
sass-embedded (1.71.1-arm-linux-musleabihf)
google-protobuf (~> 3.25)
sass-embedded (1.71.1-arm64-darwin)
google-protobuf (~> 3.25)
sass-embedded (1.71.1-x86-linux-gnu)
google-protobuf (~> 3.25)
sass-embedded (1.71.1-x86-linux-musl)
google-protobuf (~> 3.25)
sass-embedded (1.71.1-x86_64-darwin)
google-protobuf (~> 3.25)
sass-embedded (1.71.1-x86_64-linux-gnu)
google-protobuf (~> 3.25)
sass-embedded (1.71.1-x86_64-linux-musl)
google-protobuf (~> 3.25)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2022.1)
tzinfo-data (1.2024.1)
tzinfo (>= 1.0.0)
unicode-display_width (1.8.0)
unicode-display_width (2.5.0)
webrick (1.8.1)

PLATFORMS
ruby
aarch64-linux-gnu
aarch64-linux-musl
arm-linux
arm-linux-gnueabihf
arm-linux-musleabihf
arm64-darwin
x86-linux
x86-linux-gnu
x86-linux-musl
x86_64-darwin
x86_64-linux
x86_64-linux-gnu
x86_64-linux-musl

DEPENDENCIES
jekyll-graphviz!
jekyll-jupyter-notebook!
jekyll-text-theme
tzinfo-data

BUNDLED WITH
2.3.10
2.5.6
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,4 +222,4 @@ plugins:
- jekyll-paginate
- jekyll-sitemap
- jemoji
# - jekyll-jupyter-notebook
- jekyll-jupyter-notebook
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ date: 2024-02-27 11:14:41
tags: ai ntu machine-learning mathematical-foundations
---

# 机器学习基石 - 作业 2
本文可运行的 [Jupyter Notebook 链接](http://www.baidu.com)

<!--more-->

{% include_relative decision_stump.html %}
{% include_relative decision_stump.md %}
Loading

0 comments on commit 6d8a2cd

Please sign in to comment.