Git Product home page Git Product logo

depotdelivery.jl's Introduction

DepotDelivery

Build Status

DepotDelivery bundles a Julia project into a standalone depot that can run in air-gapped environments.

Features

  • Bundles all necessary Julia code and artifacts needed to run without internet access.
  • Build for platforms other than the host platform.
  • Can build multiple packages/projects into a single path.
  • Can precompile all dependencies to built path.

Usage

Example 1

using DepotDelivery: build

# Assumes `path/Project.toml` exists (or `path/JuliaProject.toml`)
path = build(path_to_project; platform = Base.BinaryPlatforms.HostPlatform())
  • path is the ready-to-ship depot.
  • Your project lives at $path/dev/MyProject.
  • The build settings live in $path/config/depot_build.toml
  • Run this in the production environment to get started: include("$path/config/depot_startup.jl").

Example 2

This example shows how to build a depo path from different Project.toml files, enabling precompilation as needed.

using DepotDelivery: build

# We can provide a depot_path to share DEPOT_PATH 
depot_path = "path/to/depot/"

# Assumes `path/Project.toml` exists (or `path/JuliaProject.toml`) in each entry of first argument, and force precompilation.
path = build(["path/project-1", "path-2/project-2"]; depot=depot_path, precompiled=true)

Be aware that build will copy everything inside those directories to depot_path/dev/. Avoid populating those directories with unnecessary files. For example, when starting a new project, it's better to run julia --project=./isolated_folder/ rather than julia --project=., as in the latter case the Project.toml file will coexist with other stuff.

Building for Non-Host Platforms

  • Use any Base.BinaryPlatforms.AbstractPlatform as the platform argument.
  • See Julia's supported OS/architectures.
  • See ?Base.BinaryPlatforms.Platform and the types in Pkg.BinaryPlatforms for details, e.g.
import Pkg

Base.BinaryPlatforms.Platform("windows", "x86_64"; cuda == "10.1")

# `arch` argument must be in (:x86_64, :i686m, :armv7l, :armv6l, :aarch64, :powerpc64le)
Pkg.BinaryPlatforms.Windows(:x86_64)
Pkg.BinaryPlatforms.MacOS()
Pkg.BinaryPlatforms.Linux(:powerpc64le)
Pkg.BinaryPlatforms.FreeBSD(:armv7l)

Limitations

  • The parts of your dependencies that expect/require internet access will not work (this should be expected).
  • It's assumed your package is completely standalone, and won't need to be used with packages outside of the provided project file.

depotdelivery.jl's People

Contributors

dependabot[bot] avatar elvispy avatar joshday avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

josbert1 elvispy

depotdelivery.jl's Issues

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.