Last active
August 29, 2015 14:21
-
-
Save mdavezac/8a23302f4b1da32e2038 to your computer and use it in GitHub Desktop.
create julia image for specific virtual env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /home/mdavezac/usr/src/julia-cb9bcae93a/bin/julia | |
packages = ["Gadfly", "IJulia", "ZMQ", "Winston", "Tk", "Cairo", | |
"ProfileView", "ImageView"] | |
syspath = joinpath(expanduser("~"), ENV["VIRTUAL_ENV"], "share", "julia") | |
ispath(syspath) || mkdir(syspath) | |
isdir(syspath) || error(syspath, " is not a directory") | |
include(joinpath(JULIA_HOME, Base.DATAROOTDIR, "julia", "build_sysimg.jl")) | |
Pkg.update() | |
for package in packages | |
Pkg.add(package) | |
end | |
path, io = mktemp() | |
try | |
for package in packages | |
println(io, "using ", package) | |
end | |
close(io) | |
build_sysimg(joinpath(syspath, "image"), "native", path, force=true) | |
finally | |
rm(path) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment