{"id":16475881,"url":"https://github.com/terasakisatoshi/sysimage_creator","last_synced_at":"2025-09-19T22:11:41.073Z","repository":{"id":38020774,"uuid":"361457986","full_name":"terasakisatoshi/sysimage_creator","owner":"terasakisatoshi","description":"Create sysimage with PackageCompiler power","archived":false,"fork":false,"pushed_at":"2023-03-04T23:18:21.000Z","size":472,"stargazers_count":13,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T20:08:26.540Z","etag":null,"topics":["julia","jupyter","packagecompiler"],"latest_commit_sha":null,"homepage":"https://discourse.julialang.org/t/tool-sysimage-creator-for-ijulia-users/61229","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/terasakisatoshi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-25T14:57:36.000Z","updated_at":"2023-10-09T17:01:19.000Z","dependencies_parsed_at":"2024-10-11T12:40:55.293Z","dependency_job_id":"819f7a90-fb81-4c36-8b2f-96b9dee8077c","html_url":"https://github.com/terasakisatoshi/sysimage_creator","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terasakisatoshi%2Fsysimage_creator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terasakisatoshi%2Fsysimage_creator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terasakisatoshi%2Fsysimage_creator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terasakisatoshi%2Fsysimage_creator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terasakisatoshi","download_url":"https://codeload.github.com/terasakisatoshi/sysimage_creator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245097158,"owners_count":20560311,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["julia","jupyter","packagecompiler"],"created_at":"2024-10-11T12:40:42.700Z","updated_at":"2025-09-19T22:11:35.998Z","avatar_url":"https://github.com/terasakisatoshi.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# sysimage_creator\n\n[![CI](https://github.com/terasakisatoshi/sysimage_creator/actions/workflows/CI.yml/badge.svg)](https://github.com/terasakisatoshi/sysimage_creator/actions/workflows/CI.yml)\n\n- This repository aims to provide scripts that create sysimage that accelerates initialization of IJulia kernel.\n- It also will reduce latency when working locally with packages that has a high startup time e.g. Plots.jl or StatsPlots.jl .\n\n# Usage: For 今北産業(TL;DR) users\n\n```console\n$ git clone https://github.com/terasakisatoshi/sysimage_creator.git\n$ pip install jupyter jupytext nbconvert ipykernel\n$ cd sysimage_creator \u0026\u0026 make \u0026\u0026 jupyter notebook\n```\n\nThen open your jupyter notebook and select a kernel named `Julia-sys 1.6.3`\n\n# Usage: For reasonable people\n\n## Step 1: Install dependencies\n\n- Almost people can skip this step because your are trying to improve your Jupyter IJulia.jl, to You know what to do.\n- Install [Julia](https://julialang.org/downloads/) and Python\n- Let's install `jupyter` (or `jupyterlab` instead) and `jupytext` via:\n```console\n$ pip install jupyter jupytext\n$ pip install nbconvert ipykernel cython # I'm not sure, but you will need on Windows.\n```\n\n- After that, let's moving on to Step2!!!\n\n### Step1-1: Help! I'm new to any kind of programming language.\n\n- All right. Welcome to Julia! First of all please [install Julia from here](https://julialang.org/downloads/). Please see platform specific instructions for further installation instructions and if you have trouble installing Julia. You'll learn how to add a path of a program for Julia. Open your terminal and type `julia` command.\n\n```console\n$ julia\n               _\n   _       _ _(_)_     |  Documentation: https://docs.julialang.org\n  (_)     | (_) (_)    |\n   _ _   _| |_  __ _   |  Type \"?\" for help, \"]?\" for Pkg help.\n  | | | | | | |/ _` |  |\n  | | |_| | | | (_| |  |  Version 1.6.3 (2021-09-23)\n _/ |\\__'_|_|_|\\__'_|  |  Official https://julialang.org/ release\n|__/                   |\n\njulia\u003e # congrats!\njulia\u003e exit() # exit from julia REPL\n$ julia # you can start again.\n```\n\n- Moving on to the next step. Let's install PyCall and IJulia and then your environment can initialize jupyter notebook\n\n```conosle\njulia\u003e ENV[\"PYTHON\"]=\"\"; ENV[\"JUPYTER\"]=\"\"\njulia\u003e using Pkg; Pkg.add([\"PyCall\", \"IJulia\", \"Conda\"])\njulia\u003e using Conda; Conda.add([\"jupyter\", \"jupytext\"], channel=\"conda-forge\")\n```\n\n- Tips: you don't have to copy code above line by line. Copy the whole 3 lines. Don't hesitate to include prompt `julia\u003e`. Then just do paste to your julia REPL.\n- Tips: Setting `ENV[\"PYTHON\"]=\"\"; ENV[\"JUPYTER\"]=\"\"` makes julia select Python provided via [Conad.jl](https://github.com/JuliaPy/Conda.jl). Conda.jl uses the miniconda Python environment, which only includes conda and its dependencies. If you have LITTLE experience with Python, just follow the instructions above is fine.\n- Tips: Ah, you've remembered you can use Python and Jupyter from your termina? e.g.\n\n```console\n$ python\n\u003e\u003e\u003e\n```\n\n```console\n$ pip install numpy\n```\nor whatever\n\n```console\n$ jupyter notebook\n```\n\nIf so, you may consider do the following command:\n\n```julia\njulia\u003e run(`pip install jupyter jupytext nbconvert ipykernel`)\njulia\u003e ENV[\"PYTHON\"]=Sys.which(\"python3\"); ENV[\"JUPYTER\"]=Sys.which(\"jupyter\")\njulia\u003e using Pkg; Pkg.build([\"PyCall\", \"IJulia\"])\n```\n\nWhat does it do? Well, read the code: [deps/build.jl](https://github.com/JuliaLang/IJulia.jl/blob/master/deps/build.jl).\n\nAnyway, after finished the installation, let's initialize Juptyer notebook:\n\n```julia\njulia\u003e using IJulia; notebook(dir=pwd())\n```\n\n## Step 2: Create sysimage\n\n- Ah... also make sure you can use `$ make` command in your terminal.\n- Just run `make`. It will make sysimage named `sys.{DLEXT}`, where `DLEXT` is `dylib, dll or so`.\n\n```\n$ make\n...\n...\n...\n$ ls\nsys.dylib # e.g. macOS users\n```\n\n## Testout sysimage\n\n### Case 1: from terminal\n\n- You can feel how much time we can reduce the latency of loading Julia packages when we use our sysimage:\n\n```console\n$ cat benchmark.jl\n# use standard julia\n@time run(`jupytext --to ipynb --execute testout_naive.jl`)\n# use sys.${DLEXT} as sysimage\n@time run(`jupytext --to ipynb --execute testout_sys.jl`)\n$ julia --project=@. benchmark.jl\n```\n\nor just run `make test` :D.\n\n### Case 2: from jupyter\n\n- Open Jupyter Notebook as always:\n\n```console\n$ jupyter notebook\n```\n\n- Then you'll see New kernel for Julia named `Julia-sys 1.6.3`.\n\n![](assets/jupyter_kernel_list.png)\n\n- Please select it. This kernel is generated by `installkernel.jl` which is stored in this repository.\n\n```console\n$ cat ~/Library/Jupyter/kernels/julia-sys-1.6/kernel.json\n{\n  \"display_name\": \"Julia-sys 1.6.3\",\n  \"argv\": [\n    \"/Applications/Julia-1.6.app/Contents/Resources/julia/bin/julia\",\n    \"-i\",\n    \"--color=yes\",\n    \"--project=@.\",\n    \"--sysimage=sys\", # \u003c--- this `sys` is a name of sysimage\n    \"/Users/\u003cyour-user-name\u003e/.julia/packages/IJulia/e8kqU/src/kernel.jl\",\n    \"{connection_file}\"\n  ],\n  \"language\": \"julia\",\n  \"env\": {},\n  \"interrupt_mode\": \"signal\"\n}\n```\n\n- If you click `testout_sys.jl` file, Jupyter recognize this file as notebook, and initialize it with option `--sysimage=sys`.\n- Here is a result of running `testout_sys.jl` using our sysimage:\n\n![](assets/testout_sys.png)\n\n- Here is a result of running `testout_naive.jl` using standard sysimage, which is so slow:\n\n![](assets/testout_naive.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterasakisatoshi%2Fsysimage_creator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterasakisatoshi%2Fsysimage_creator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterasakisatoshi%2Fsysimage_creator/lists"}