-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile-pl
More file actions
65 lines (53 loc) · 2.28 KB
/
Dockerfile-pl
File metadata and controls
65 lines (53 loc) · 2.28 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
ARG BASE_CONTAINER=define_as_build_arg
#
# From https://github.com/almond-sh/almond
#
FROM $BASE_CONTAINER as coursier_base
LABEL MAINTAINER="CSEL Ops <admin@cs.colorado.edu>"
ARG LOCAL_IVY=no
USER root
RUN apt-get -y update && \
apt-get install --no-install-recommends -y \
curl \
ca-certificates-java && \
apt-get clean && \
#
# from https://www.scala-sbt.org/1.x/docs/Installing-sbt-on-Linux.html
#
apt-get update &&\
apt-get install apt-transport-https curl gnupg -yqq && \
echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list && \
echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list && \
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo -H gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/scalasbt-release.gpg --import && \
chmod 644 /etc/apt/trusted.gpg.d/scalasbt-release.gpg && \
apt-get update && \
apt-get install -y sbt && \
##
## Install the Java sources for debugging and function definition support in Metals.
## You may have to adjust the version to the match the JDK installed
##
apt-get install -y openjdk-11-source && \
rm -rf /var/lib/apt/lists/*
RUN curl -Lo /usr/local/bin/coursier https://github.com/coursier/coursier/releases/download/v2.0.0-RC3-2/coursier && \
chmod +x /usr/local/bin/coursier
# Install a metal plugin(vscode)
ADD metals-vscode /opt/install/metals-vscode
USER $NB_UID
# ensure the JAR of the CLI is in the coursier cache, in the image
RUN /usr/local/bin/coursier --help
ARG ALMOND_VERSION
# Set to a single Scala version string or list of Scala versions separated by a space.
# i.e SCALA_VERSIONS="2.12.9 2.13.0 2.13.8"
ARG SCALA_VERSIONS
COPY scripts/pl-install-kernels.sh .
USER root
RUN sh -c '(echo "#!/usr/bin/env sh" && curl -L https://github.com/com-lihaoyi/Ammonite/releases/download/2.5.2/2.13-2.5.2) > /usr/local/bin/amm && chmod +x /usr/local/bin/amm'
RUN ./pl-install-kernels.sh && \
rm pl-install-kernels.sh && \
rm -rf .ivy2 && \
jupyter kernelspec list
RUN ls -lR /home/jovyan && \
rm -rf /home/jovyan && \
mkdir /home/jovyan && \
chown $NB_UID:$NB_GID /home/jovyan
USER $NB_UID