Skip to content

Commit

Permalink
update julia packages
Browse files Browse the repository at this point in the history
Signed-off-by: Greg Werner <[email protected]>
  • Loading branch information
jgwerner committed Mar 8, 2024
1 parent 9216123 commit 18824c8
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 117 deletions.
27 changes: 0 additions & 27 deletions umich-grader/Dockerfile

This file was deleted.

38 changes: 10 additions & 28 deletions umich-notebook/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Based mostly off of https://github.com/jupyter/docker-stacks/datascience-notebook image
ARG TAG=julia-1.6.1
ARG TAG=julia-1.9.0
ARG BASE_IMAGE=jupyter/datascience-notebook
FROM $BASE_IMAGE:$TAG

Expand All @@ -9,34 +9,12 @@ ENV NB_GID=100
USER "${NB_UID}"

# Install julia packages
COPY install.jl /tmp/install.jl
RUN julia /tmp/install.jl \
&& fix-permissions "${JULIA_PKGDIR}" \
RUN curl https://s3.us-west-2.amazonaws.com/configs.illumidesk.com/docker/install.jl --output /tmp/install.jl
RUN julia /tmp/install.jl
RUN fix-permissions "${JULIA_PKGDIR}" \
&& fix-permissions "${HOME}"

# copy configs, we use our own to provide a base jhub config and an additional
# default config that loads/appends from the base config. this is usefule in case
# we need to add other images that default to other paths, etc.
RUN mkdir -p /etc/jupyter
RUN cp /etc/jupyter/jupyter_notebook_config.py /etc/jupyter/jupyter_notebook_config_base.py
COPY jupyter_notebook_config.py /etc/jupyter/
COPY global_nbgrader_config.py /etc/jupyter/nbgrader_config.py

COPY requirements.txt /tmp/requirements.txt
RUN python3 -m pip install -r /tmp/requirements.txt

# install nbgrader and then disable all extensions by default
RUN jupyter nbextension install --symlink --sys-prefix --py nbgrader --overwrite \
&& jupyter nbextension disable --sys-prefix --py nbgrader \
&& jupyter serverextension disable --sys-prefix --py nbgrader

# everyone gets the nbgrader validate extension
RUN jupyter nbextension enable --sys-prefix validate_assignment/main --section=notebook \
&& jupyter serverextension enable --sys-prefix nbgrader.server_extensions.validate_assignment

# everyone assignment list extension
RUN jupyter serverextension enable --sys-prefix nbgrader.server_extensions.assignment_list \
&& jupyter nbextension enable --sys-prefix assignment_list/main --section=tree
RUN pip install jupyter_kernel_gateway psycopg2-binary

# update permissions as root
USER root
Expand All @@ -45,6 +23,10 @@ RUN fix-permissions /etc/jupyter/ \
&& fix-permissions "${JULIA_PKGDIR}" \
&& fix-permissions "${HOME}"

RUN mv "${CONDA_DIR}/share/jupyter/kernels/julia"* "${CONDA_DIR}/share/jupyter/kernels/julia/"

USER "${NB_UID}"

WORKDIR "${HOME}"
WORKDIR "${HOME}"

CMD ["jupyter", "kernelgateway", "--KernelGatewayApp.ip=0.0.0.0", "--KernelGatewayApp.port=8888"]
14 changes: 0 additions & 14 deletions umich-notebook/global_nbgrader_config.py

This file was deleted.

37 changes: 21 additions & 16 deletions umich-notebook/install.jl
Original file line number Diff line number Diff line change
@@ -1,41 +1,46 @@
# This mechanism allows us to import a package list.
# Source: https://discourse.julialang.org/t/building-a-dockerfile-with-packages/37272/2

using Pkg
pkg"add BenchmarkTools"
pkg"add Colors"
pkg"add Conda"
pkg"add CSV"
pkg"add CSVFiles"
pkg"add Compat"
pkg"add CoordinateTransformations"
pkg"add DataFrames"
pkg"add DelimitedFiles"
pkg"add DifferentialEquations"
pkg"add Distributions"
pkg"add FileIO"
pkg"add FiniteDiff"
pkg"add ForwardDiff"
pkg"add GeometryBasics"
pkg"add GMT"
pkg"add GR"
pkg"add GtkReactive"
pkg"add IJulia"
pkg"add ImageFiltering"
pkg"add Images"
pkg"add ImageInTerminal"
pkg"add ImageFiltering"
pkg"add ImageFeatures"
pkg"add Images"
pkg"add ImageView"
pkg"add Interact"
pkg"add LaTeXStrings"
pkg"add Interpolations"
pkg"add JLD2"
pkg"add LinearAlgebra"
pkg"add LaTeXStrings"
pkg"add Latexify"
pkg"add MeshCat"
pkg"add OSQP"
pkg"add Plotly"
pkg"add Plots"
pkg"add Plotly"
pkg"add Printf"
pkg"add ProgressBars"
pkg"add PyCall"
pkg"add PyPlot"
pkg"add Random"
pkg"add Rotations"
pkg"add Roots"
pkg"add SparseArrays"
pkg"add Statistics"
pkg"add SymEngine"
pkg"add Symbolics"
pkg"add SymbolicUtils"
pkg"add TestImages"
pkg"add Statistics"
pkg"add StaticArrays"
pkg"add WebIO"
pkg"add WGLMakie"
pkg"add https://github.com/VMLS-book/VMLS.jl"
pkg"add https://github.com/korsbo/Latexify.jl"
Pkg"precompile"
26 changes: 0 additions & 26 deletions umich-notebook/jupyter_notebook_config.py

This file was deleted.

5 changes: 0 additions & 5 deletions umich-notebook/requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion umich-notebook/test/test_languages.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
'language,version_output',
[
('python', ['Python', '3.9.6\n']),
('julia', ['julia', 'version', '1.6.1\n']),
('julia', ['julia', 'version', '1.9.0\n']),
],
)
def test_languages(language, version_output):
Expand Down

0 comments on commit 18824c8

Please sign in to comment.