Skip to content

Commit 80e49f0

Browse files
authored
Update Dockerfile
1 parent e86e610 commit 80e49f0

1 file changed

Lines changed: 43 additions & 20 deletions

File tree

images/datascience-notebook/Dockerfile

Lines changed: 43 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ ENV DEBCONF_NOWARNINGS="yes"
1414
RUN apt-get update -y && \
1515
apt-get -qq install -y --no-install-recommends \
1616
git \
17+
libgdal-dev
18+
    libproj-dev \
19+
    libgeos-dev \
20+
    libudunits2-dev \
21+
libgit2-dev \
22+
    pkg-config \
1723
curl \
1824
rsync \
1925
unzip \
@@ -67,29 +73,47 @@ USER jovyan
6773
ARG JUPYTERSERVER_VERSION=2.14.2 NBGRADER_VERSION=0.9.3 JUPYTERLAB_VERSION=4.2.4 NBCONVERT_VERSION=7.16.4 NOTEBOOK_VERSION=7.2.1 NBCLASSIC_VERSION=1.1.0
6874
ARG PANDAS_VERSION=2.2.3 STATSMODELS_VERSION=0.14.4 BOTTLENECK_VERSION=1.4.2 NUMEXPR_VERSION=2.10.2
6975

70-
# Install essential+datascience pip packages
71-
## mistune added for nbgrader issues
72-
RUN mamba install -c conda-forge pillow typing-extensions tzlocal appdirs gputil mock pytest umap-learn && \
73-
mamba install -c conda-forge nltk statsmodels=$STATSMODELS_VERSION pandas=$PANDAS_VERSION mistune && \
74-
mamba install -c conda-forge dpkt nose datascience pyarrow bottleneck=$BOTTLENECK_VERSION umap-learn numexpr=$NUMEXPR_VESION && \
75-
python -c 'import matplotlib.pyplot' && \
76-
fix-permissions $CONDA_DIR && \
77-
fix-permissions /home/$NB_USER && \
78-
mamba clean --all
76+
RUN pip install uv
7977

80-
# Install jupyterlab+extensions
81-
RUN mamba install -c conda-forge jupyterhub=$JUPYTERHUB_VERSION jupyter_server=$JUPYTERSERVER_VERSION && \
82-
mamba install -c conda-forge jupyterlab=$JUPYTERLAB_VERSION notebook=$NOTEBOOK_VERSION nbclassic=$NBCLASSIC_VERSION && \
83-
# (TODO: Re-enable collab once RTC is fixed) mamba install -c conda-forge jupyterlab_rise jupyter_server_terminals jupyter-collaboration && \
84-
mamba install -c conda-forge jupyterlab_rise jupyter_server_terminals && \
85-
mamba install -c conda-forge jupyterlab-latex jupyterlab-git jupyterlab-fasta jupyterlab-geojson && \
86-
mamba install -c conda-forge nbconvert=$NBCONVERT_VERSION nbgrader=$NBGRADER_VERSION && \
78+
RUN uv pip install --no-cache \
79+
pillow \
80+
typing-extensions \
81+
tzlocal \
82+
appdirs \
83+
gputil \
84+
mock \
85+
pytest \
86+
umap-learn \
87+
nltk \
88+
statsmodels=$STATSMODELS_VERSION \
89+
pandas=$PANDAS_VERSION \
90+
mistune \
91+
dpkt \
92+
nose \
93+
datascience \
94+
pyarrow \
95+
bottleneck=$BOTTLENECK_VERSION \
96+
numexpr=$NUMEXPR_VERSION \
97+
jupyterhub=$JUPYTERHUB_VERSION \
98+
jupyter_server=$JUPYTERSERVER_VERSION \
99+
jupyterlab=$JUPYTERLAB_VERSION \
100+
notebook=$NOTEBOOK_VERSION \
101+
nbclassic=$NBCLASSIC_VERSION \
102+
jupyterlab_rise \
103+
jupyter_server_terminals \
104+
jupyter-collaboration \
105+
jupyterlab-latex \
106+
jupyterlab-git \
107+
jupyterlab-fasta \
108+
jupyterlab-geojson \
109+
nbconvert=$NBCONVERT_VERSION \
110+
nbgrader=$NBGRADER_VERSION && \
111+
python -c 'import matplotlib.pyplot' && \
87112
fix-permissions $CONDA_DIR && \
88113
fix-permissions /home/$NB_USER && \
89-
mamba clean --all
90114

91115
# Install R packages
92-
RUN mamba install -c conda-forge r-markdown r-covr r-git2r r-crosstalk r-dt -y && \
116+
RUN R -e "install.packages(c('sf', 'markdown', 'covr', 'git2r', 'crosstalk', 'DT'), repos='https://cloud.r-project.org')" && \
93117
fix-permissions $CONDA_DIR && \
94118
fix-permissions /home/$NB_USER && \
95119
mamba clean -a -y
@@ -107,7 +131,6 @@ RUN jupyter labextension disable @jupyterlab/extensionmanager-extension
107131
ENV NBGRADER_COURSEID="NA"
108132
ENV JUPYTERHUB_USER=${NB_USER}
109133

110-
RUN pip cache purge
111-
RUN conda clean -t -p -i -y
134+
RUN uv cache clean
112135

113136
WORKDIR /home/jovyan

0 commit comments

Comments
 (0)