Skip to content

Commit

Permalink
env for worker procs
Browse files Browse the repository at this point in the history
  • Loading branch information
sosiristseng committed Sep 14, 2024
1 parent 2a31339 commit 64f8cec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
if: ${{ runner.environment == 'self-hosted' || steps.cache-julia.outputs.cache-hit != 'true' }}
shell: julia --color=yes {0}
run: |
using Pkg, Dates
using Pkg
Pkg.add(["IJulia", "Literate", "PrettyTables", "JSON"])
Pkg.activate(".")
Pkg.instantiate()
Expand All @@ -85,7 +85,7 @@ jobs:
key: ${{ steps.cache-julia.outputs.cache-primary-key }}
- name: Run notebooks
if: ${{ steps.cache-nb.outputs.cache-hit != 'true' }}
run: julia --color=yes -p ${{ env.LITERATE_PROC }} --heap-size-hint=3G run.jl
run: julia --project=@. --color=yes -p ${{ env.LITERATE_PROC }} run.jl
- name: Copy back built notebooks
run: cp --verbose -rf ${{ env.NBCACHE }}/docs/* docs/
- name: Build website
Expand Down
5 changes: 1 addition & 4 deletions run.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ using IJulia
@everywhere begin
ENV["GKSwstype"] = "100"
using Literate, Pkg, JSON
Pkg.activate(Base.current_project())
end

# Strip SVG output from a Jupyter notebook
Expand Down Expand Up @@ -100,9 +99,7 @@ function main(;
ts_lit = pmap(litnbs; on_error=ex -> NaN) do nb
@elapsed run_literate(nb, cachedir; rmsvg)
end

# Remove worker processes to release some memory
rmprocs(workers())
rmprocs(workers()) # Remove worker processes to release some memory

# Debug notebooks one by one if there are errors
for (nb, t) in zip(litnbs, ts_lit)
Expand Down

0 comments on commit 64f8cec

Please sign in to comment.