forked from ucsd-ets/julia-notebook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-julia-packages.bash
33 lines (30 loc) · 957 Bytes
/
setup-julia-packages.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
set -exuo pipefail
# Requirements:
# - Run as non-root user
# - The JULIA_PKGDIR environment variable is set
# - Julia is already set up, with the setup-julia.bash command
# Install base Julia packages
julia -e '
import Pkg;
Pkg.update();
Pkg.add([
"HDF5",
"IJulia",
"Pluto"
]);
Pkg.precompile();
'
# Move the kernelspec out of ${HOME} to the system share location.
# Avoids problems with runtime UID change not taking effect properly
# on the .local folder in the jovyan home dir.
mv "${HOME}/.local/share/jupyter/kernels/julia"* "${CONDA_DIR}/share/jupyter/kernels/"
chmod -R go+rx "${CONDA_DIR}/share/jupyter"
rm -rf "${HOME}/.local"
fix-permissions "${JULIA_PKGDIR}" "${CONDA_DIR}/share/jupyter"
# Install jupyter-pluto-proxy to get Pluto to work on JupyterHub
mamba install --yes \
'jupyter-pluto-proxy' && \
mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"