Skip to content

Commit

Permalink
reopt_jl changes for Windows install
Browse files Browse the repository at this point in the history
  • Loading branch information
lilycatolson committed Jun 24, 2024
1 parent 198c725 commit 53a59ea
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions omf/solvers/reopt_jl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,19 @@ def install_reopt_jl(system : list = platform.system(), build_sysimage=True):
commands += [ f'touch "{instantiated_path}"' ]
elif system == "Windows":
commands = [
f'cd "{thisDir}" & del julia-1.9.4-win64.zip',
f'cd "{thisDir}" & curl -o julia-1.9.4-win64.zip https://julialang-s3.julialang.org/bin/winnt/x64/1.9/julia-1.9.4-win64.zip',
f'cd "{thisDir}" & tar -x -f "julia-1.9.4-win64.zip' ]
f'cd {thisDir} & del julia-1.9.4-win64.zip',
f'cd {thisDir} & curl -o julia-1.9.4-win64.zip https://julialang-s3.julialang.org/bin/winnt/x64/1.9/julia-1.9.4-win64.zip',
f'cd {thisDir} & tar -x -f julia-1.9.4-win64.zip' ]
commands += install_pyjulia
if build_sysimage:
commands += [
f'''cd "{thisDir}\\julia-1.9.4\\bin" & julia --project="{project_path}" -e '
f'''cd {thisDir}\\julia-1.9.4\\bin & julia --project="{project_path}" -e '
import Pkg; Pkg.instantiate();
import REoptSolver; using PackageCompiler;
PackageCompiler.create_sysimage(["REoptSolver"]; sysimage_path="{sysimage_path}",
precompile_execution_file="{precompile_path}", cpu_target="generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)")
' '''
f'copy nul "{instantiated_path}"'
]
' ''']
commands += [ f'copy nul {instantiated_path}' ]
else:
raise ValueError(f'No installation script available yet for {system}')

Expand Down

0 comments on commit 53a59ea

Please sign in to comment.