3
3
# python 3.11 version posted on 6-13-2023 (arm64)
4
4
# FROM jupyter/pyspark-notebook@sha256:c05345a6d72b5a12ba38a77e07681eb704a027fdbe7fc622a36fb2cc801db11c
5
5
# python 3.11 version posted on 6-25-2023 (amd64)
6
- FROM jupyter/pyspark-notebook@sha256:cc4e4a6d19b0e05124e6340473346acfcd9bafb27bfcba153644810041a99c4d
6
+ # FROM jupyter/pyspark-notebook@sha256:cc4e4a6d19b0e05124e6340473346acfcd9bafb27bfcba153644810041a99c4d
7
+ # 2023-09-18 version (amd64)
8
+ FROM jupyter/pyspark-notebook@sha256:a66f0b98a323c274097fbbf4fbbacb3b90edcffea1aa279579b17b6f1003798c
7
9
8
10
LABEL Vincent Nijs
"[email protected] "
9
11
@@ -29,11 +31,12 @@ RUN apt-get update -qq && apt-get -y --no-install-recommends install \
29
31
rsync \
30
32
lsb-release \
31
33
libcurl4-openssl-dev \
32
- git
34
+ git \
35
+ netcat
33
36
34
- ENV CMDSTAN_VERSION="2.32.2 "
35
- ENV PANDAS_VERSION="2.0.2 "
36
- ENV PYARROW_VERSION="12 .0.0"
37
+ ENV CMDSTAN_VERSION="2.33.1 "
38
+ ENV PANDAS_VERSION="2.1.1 "
39
+ ENV PYARROW_VERSION="13 .0.0"
37
40
RUN mamba install --quiet --yes -c conda-forge \
38
41
pandas=${PANDAS_VERSION} \
39
42
cmdstan=${CMDSTAN_VERSION} \
@@ -65,11 +68,8 @@ RUN mamba install --quiet --yes -c conda-forge \
65
68
black \
66
69
isort \
67
70
nltk \
68
- jupyterlab-git \
69
- jupyterlab-spellchecker \
70
71
jupyter-server-proxy \
71
72
jupyter-rsession-proxy \
72
- jupyterlab-system-monitor \
73
73
streamlit \
74
74
xlrd \
75
75
openpyxl \
@@ -90,8 +90,8 @@ RUN chmod 755 setup.sh \
90
90
&& rm setup.sh
91
91
92
92
# make system (conda) R the first choice
93
- # ENV R_VERSION=4.3.0
94
- ENV R_VERSION=4.2.3
93
+ ENV R_VERSION=4.3.1
94
+ # ENV R_VERSION=4.2.3
95
95
ENV TERM=xterm
96
96
ENV R_HOME=/opt/conda/lib/R
97
97
ENV PATH="/usr/local/bin:$PATH"
@@ -114,8 +114,6 @@ RUN mamba install --quiet --yes -c conda-forge \
114
114
&& ln -s /opt/conda/bin/R /usr/local/bin/R \
115
115
&& ln -s /opt/conda/bin/Rscript /usr/local/bin/Rscript
116
116
117
-
118
-
119
117
# not available through conda-forge for both arm and amd
120
118
# or the conda version is causing issues
121
119
RUN pip install \
@@ -128,6 +126,8 @@ RUN pip install \
128
126
shiny \
129
127
pyrsm
130
128
129
+ # catboost # not available for arm64
130
+
131
131
RUN echo "R_LIBS_USER='~/.rsm-msba/R/${R_VERSION}'" >> ${R_HOME}/etc/Renviron.site
132
132
RUN echo '.libPaths(unique(c(Sys.getenv("R_LIBS_USER"), .libPaths())))' >> ${R_HOME}/etc/Rprofile.site
133
133
@@ -143,10 +143,10 @@ RUN chmod +x setup.sh \
143
143
&& rm setup.sh
144
144
145
145
# tooling for Bayesian Machine Learning class
146
- COPY files/setup-bml.sh setup.sh
147
- RUN chmod +x setup.sh \
148
- && ./setup.sh \
149
- && rm setup.sh
146
+ # COPY files/setup-bml.sh setup.sh
147
+ # RUN chmod +x setup.sh \
148
+ # && ./setup.sh \
149
+ # && rm setup.sh
150
150
151
151
# adding postgres
152
152
# mostly from https://docs.docker.com/engine/examples/postgresql_service/
@@ -194,6 +194,10 @@ RUN addgroup ${NB_USER} postgres \
194
194
&& chown -R postgres:postgres /etc/postgresql/${POSTGRES_VERSION}/main/ \
195
195
&& fix-permissions /etc/postgresql/${POSTGRES_VERSION}/main/
196
196
197
+ # from https://github.com/ucsd-ets/rsm-msba-datahub/blob/master/Dockerfile
198
+ # RUN chmod -R 777 /etc/postgresql/${POSTGRES_VERSION}
199
+ # RUN chmod -R 777 /var/lib/postgresql/
200
+
197
201
# oh-my-zsh (need to install wget and curl again ...)
198
202
RUN apt-get update -qq && apt-get -y --no-install-recommends install wget curl \
199
203
&& sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" \
@@ -209,7 +213,7 @@ COPY files/p10k.zsh /etc/skel/.p10k.zsh
209
213
COPY files/usethis /usr/local/bin/usethis
210
214
COPY files/clean.sh /usr/local/bin/clean
211
215
212
- # settings for local install of python packages
216
+ # settings for local install of python packages
213
217
ARG PYBASE=/home/${NB_USER}/.rsm-msba
214
218
ENV PYBASE=${PYBASE}
215
219
ENV PYTHONUSERBASE=${PYBASE} \
@@ -286,7 +290,16 @@ RUN chmod +x setup.sh \
286
290
&& ./setup.sh \
287
291
&& rm setup.sh
288
292
289
- EXPOSE 8181 8282 8765 8989 8501 8000 6006
293
+ # SSH login fix, otherwise user gets kicked off after login
294
+ RUN sed 's@session\s *required\s *pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd \
295
+ && mkdir -p /var/run/sshd \
296
+ && ssh-keygen -A \
297
+ && echo 'PasswordAuthentication no' >> /etc/ssh/sshd_config \
298
+ && echo 'PermitRootLogin no' >> /etc/ssh/sshd_config
299
+
300
+ # && echo 'jovyan:rady-msba' | chpasswd \
301
+
302
+ EXPOSE 22 8181 8282 8765 8989 8501 8000
290
303
CMD ["/usr/bin/supervisord" , "-c" , "/etc/supervisor/conf.d/supervisord.conf" ]
291
304
292
305
# Switch back to jovyan to avoid accidental container runs as root
0 commit comments