{"id":22504978,"url":"https://github.com/bcbi/siege","last_synced_at":"2025-10-19T15:07:48.700Z","repository":{"id":100219333,"uuid":"566428861","full_name":"bcbi/SIEGE","owner":"bcbi","description":"🏹 For using Julia without internet access 🏰","archived":false,"fork":false,"pushed_at":"2023-09-13T20:35:35.000Z","size":34,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-27T23:23:32.615Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/bcbi.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":"2022-11-15T16:49:15.000Z","updated_at":"2024-05-11T11:31:26.000Z","dependencies_parsed_at":"2024-12-07T00:12:41.265Z","dependency_job_id":"8724d3f8-610b-4f02-912e-46d36333ec54","html_url":"https://github.com/bcbi/SIEGE","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcbi%2FSIEGE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcbi%2FSIEGE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcbi%2FSIEGE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcbi%2FSIEGE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcbi","download_url":"https://codeload.github.com/bcbi/SIEGE/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248860216,"owners_count":21173342,"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":[],"created_at":"2024-12-07T00:12:34.226Z","updated_at":"2025-10-19T15:07:48.636Z","avatar_url":"https://github.com/bcbi.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SIEGE\n🏹 SysImage Exports for General Environments 🏰\n\n## Description\n\nJulia's package manager relies on internet access, so it can be challenging to make dependencies available on secure systems.\n[PackageCompiler.jl](https://github.com/JuliaLang/PackageCompiler.jl) compiles Julia code ahead of time, primarily for [improved performance in certain workflows](https://julialang.github.io/PackageCompiler.jl/dev/index.html#PackageCompiler).\nIn particular, [generating a sysimage](https://julialang.github.io/PackageCompiler.jl/dev/sysimages.html) produces a performant stand-alone Julia session, and since its [main drawback (version locking)](https://julialang.github.io/PackageCompiler.jl/dev/sysimages.html#Drawbacks-to-custom-sysimages) is mitigated on secure systems, it is a good approach for putting a Julia session on a system without internet or `ssh` access available to users.\nThe main requirement is an internet-connected build server that has the same architecture as the secure system.\n\n[SIEGE](https://github.com/bcbi/SIEGE) takes a Julia project as input and automatically generates a sysimage (using PackageCompiler) for use in secure systems.\nIt also includes a Bash script that starts an offline Julia session with the new sysimage.\nThe script sets environment variables and accepts command-line arguments, so it can be aliased to `julia` by users.\n\n## Requirements\n\n__Julia__: SIEGE looks for Julia in the package's main directory.\nThe binaries can be [downloaded from the official site](https://julialang.org/downloads/) and uploaded to the secure system.\nThey are not modified in any way by SIEGE,\nso this only needs to be done by the developer once, or whenever a new version of Julia is needed.\nThe same version of Julia should be used to generate the sysimage.\n\n__A Julia Project__: Copy the Project file from your Julia projet into `env/`.\nAn example Julia project space is already included in `env/`.\n\nNote that the sysimage produced by SIEGE will only work on systems with matching architecture,\nsince the machine-generated manifest file is what is actually used by PackageCompiler.jl.\nIf the sysimage is intended to be moved to a secure server,\nthe build server and secure server must be as similar as possible.\n\nAdditionally, the instructions and code presuppose a *NIX type environment with Bash, but a port for Windows should be possible.\n\n## Instructions:\n0. Read through `src/SIEGE.jl` to see what's going on.\n1. Replace the example project file in `env/` with the one you want to build into a sysimage.\n2. While you're at it, go ahead and update the paths to Julia and SIEGE in `run_sysimage.sh`.\n3. Run `main()` from `src/SIEGE.jl` on the build server to build the sysimage and depot. Any generated files will be found in `build/`.\n\n```\npkg\u003e activate --temp\npkg\u003e develop Path/To/SIEGE\njulia\u003e using SIEGE\njulia\u003e main(\"/Path/To/SIEGE\")\n```\n\n4. Upload Julia and SIEGE to the secure system.\n5. Users can now use `run_sysimage.sh`. Group and permisson settings might need to be adjusted with `chgroup` and `chmod`, since many files need to be executable by users.\n6. (OPTIONAL): Add to `~/.bashrc` an alias pointing to the script. It should accept command line arguments just as the Julia binary would.\n```\nalias julia='Path/To/run_sysimage.sh'\n```\n\n## Troubleshooting\n1. Certain packages download dependencies only after they are called (lazy loading).\nTry running the sysimage on the build server to see if any additional packages are downloaded at runtime.\nIf required dependencies are left out, these can be added manually:\n    - MKL: https://github.com/JuliaLang/PackageCompiler.jl/issues/639#issuecomment-974681443\n\n2. Some packages might just not be relocatable yet and would need to be patched.\n\n## Related\n- [Secure systems: an alternate use case for PackageCompiler.jl](https://discourse.julialang.org/t/secure-systems-an-alternate-use-case-for-packagecompiler-jl/90955?u=ashlin_harris)\n- [Installing packages via an SSH SOCKS proxy on a compute cluster](https://discourse.julialang.org/t/installing-packages-via-an-ssh-socks-proxy-on-a-compute-cluster/71735?u=ashlin_harris)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcbi%2Fsiege","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcbi%2Fsiege","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcbi%2Fsiege/lists"}