jupyter/julia/Dockerfile

25 lines
910 B
Docker
Raw Normal View History

2024-06-28 15:32:11 +08:00
FROM docker.io/ben0i0d/jupyter:py-c AS builder
2024-03-17 15:40:43 +08:00
USER root
2024-04-12 16:10:40 +08:00
# install Julia packages in /opt/julias
RUN apt-get update --yes && apt-get install --yes --no-install-recommends gnupg && apt-get clean && rm -rf /var/lib/apt/lists/* && \
pip --no-cache-dir install jill && jill install --confirm
2024-06-28 15:32:11 +08:00
FROM docker.io/ben0i0d/jupyter:py-c
COPY --chown="${NB_UID}:${NB_GID}" --from=builder /opt/julias/ /opt/julias/
2024-05-29 11:43:50 +08:00
ENV JULIA_PKG_SERVER=https://mirrors.cernet.edu.cn/julia \
JULIA_NUM_THREADS=12
USER root
RUN ln -s "`find /opt/julias -name 'bin'`/julia" /usr/local/bin/julia
USER ${NB_UID}
# Install IJulia as jovyan and then move the kernelspec out to the system share location.
RUN julia -e 'import Pkg; Pkg.update()' && \
2024-03-17 15:40:43 +08:00
julia -e 'using Pkg; pkg"add IJulia"; pkg"precompile"' && \
2024-04-12 16:10:40 +08:00
mv "${HOME}/.local/share/jupyter/kernels/"* "/opt/base/share/jupyter/kernels/" && \
rm -rf "${HOME}/.local"