Skip to content

Commit

Permalink
Updated Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
VPetukhov committed Jun 30, 2022
1 parent c54b025 commit 06f4094
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ RUN apt-get update && apt-get install -y build-essential

RUN apt-get install -y python3 python3-pip vim

RUN pip3 install jupyterlab numpy scipy matplotlib seaborn pandas sklearn scikit-image \
jupyter_contrib_nbextensions jupyter_nbextensions_configurator jupyterthemes
RUN pip3 install jupyterlab numpy scipy matplotlib seaborn pandas sklearn scikit-image

RUN pip3 install -Iv six==1.12.0

Expand All @@ -17,15 +16,18 @@ RUN julia -e 'using Pkg; Pkg.add("IJulia"); Pkg.build(); using IJulia;'

## Julia Baysor envitonment

RUN julia -e 'using Pkg; Pkg.add("PackageCompiler")'
RUN julia -e 'using Pkg; Pkg.add(Pkg.PackageSpec(;name="PackageCompiler", version="2.0.6"))'
RUN julia -e 'using Pkg; Pkg.add(PackageSpec(url="https://github.com/hms-dbmi/Baysor.git")); Pkg.build();'

RUN julia -e 'import Baysor, Pkg; Pkg.activate(dirname(dirname(pathof(Baysor)))); Pkg.instantiate();'
RUN julia -e 'using PackageCompiler; import Baysor, Pkg; Pkg.activate(dirname(dirname(pathof(Baysor)))); create_sysimage(:Baysor; precompile_execution_file="$(dirname(pathof(Baysor)))/../bin/precompile.jl", replace_default=true, cpu_target="generic")'
RUN julia -e 'using PackageCompiler; import Baysor, Pkg; Pkg.activate(dirname(dirname(pathof(Baysor)))); \
create_sysimage(:Baysor; precompile_execution_file="$(dirname(pathof(Baysor)))/../bin/precompile.jl", sysimage_path="/root/BaysorSysimage.so")'

RUN \
printf "#!/usr/bin/env julia\n\nimport Baysor\nBaysor.run_cli()" >> /bin/baysor && \
printf "#!/usr/local/julia/bin/julia --sysimage=/root/BaysorSysimage.so\n\nimport Baysor\nBaysor.run_cli()" >> /bin/baysor && \
chmod +x /bin/baysor

RUN baysor --help

ENTRYPOINT ["/bin/bash"]
WORKDIR /root/

0 comments on commit 06f4094

Please sign in to comment.