Skip to content

Commit

Permalink
Merge pull request #5 from felder/felder_DH-394
Browse files Browse the repository at this point in the history
[DH-394] fix publichealth
  • Loading branch information
felder authored Oct 10, 2024
2 parents 78e9a74 + ae0d3c7 commit 34f76c1
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 56 deletions.
16 changes: 7 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ RUN apt-get update > /dev/null && \
COPY install-mambaforge.bash /tmp/install-mambaforge.bash
RUN /tmp/install-mambaforge.bash

# needed for building on mac see DH-394
RUN chown -Rh ${NB_USER}:${NB_USER} ${HOME}

USER ${NB_USER}

COPY environment.yml /tmp/environment.yml
RUN mamba env update -p ${CONDA_DIR} -f /tmp/environment.yml && \
mamba clean -afy

COPY infra-requirements.txt /tmp/infra-requirements.txt
RUN pip install --no-cache-dir -r /tmp/infra-requirements.txt

# DH-331, very similar to what was done for datahub in DH-164
ENV PLAYWRIGHT_BROWSERS_PATH ${CONDA_DIR}
RUN playwright install chromium
Expand All @@ -74,12 +74,6 @@ RUN R --quiet -e "install.packages('IRkernel', quiet = TRUE)" && \
COPY class-libs.R /tmp/class-libs.R
RUN mkdir -p /tmp/r-packages

# Workaround to install ottr, issue 3342
#RUN wget https://github.com/ucbds-infra/ottr/archive/refs/tags/0.1.0.tar.gz -O /tmp/ottr.tar.gz && R CMD INSTALL /tmp/ottr.tar.gz && rm /tmp/ottr.tar.gz

#COPY install.R /tmp/install.R
#RUN /tmp/install.R && rm -rf /tmp/downloaded_packages

COPY r-packages/ottr.r /tmp/r-packages/
RUN r /tmp/r-packages/ottr.r

Expand All @@ -98,4 +92,8 @@ RUN r /tmp/r-packages/2021-spring-phw-272a.r
# Use simpler locking strategy
COPY file-locks /etc/rstudio/file-locks

# Doing a little cleanup
RUN rm -rf /tmp/downloaded_packages
RUN rm -rf ${HOME}/.cache

ENTRYPOINT ["tini", "--"]
39 changes: 31 additions & 8 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,39 @@
channels:
- conda-forge

dependencies:
- pip
- syncthing==1.18.6
- jupyter-server-proxy==4.2.0
- jupyter-rsession-proxy==2.2.0
# Items required for basic level functionality
- gh-scoped-creds==4.1
- git==2.47.0
- jupyter-resource-usage==1.1.0
- jupyter_server==2.14.2
- jupyterhub==4.1.6
- jupyterlab==4.2.5
- jupyterlab-git==0.50.1
- jupytext==1.16.4
- nbgitpuller==1.2.1
- notebook==7.2.2
- python==3.11.*

# Other items
- jupyter-server-proxy==4.4.0
- syncthing==1.27.12
- jupyter-rsession-proxy==2.2.1
- jupyter-syncthing-proxy==1.0.3
- traitlets==5.14.3
- appmode==1.0.0

# pip installed packages, conda is preferred
- pip==24.2
- pip:
# bug w/notebook and traitlets: https://github.com/jupyter/notebook/issues/7048
- traitlets==5.9.0
# RStudio support
- otter-grader==2.2.7
# for notebook exporting
- nbconvert[webpdf]==7.16.4
- nb2pdf==0.6.2
- nbpdfexport==0.2.1
# pulled in by ottr, if not pinned to 1.16.2, 1.16.3 causes DH-323
- jupytext==1.16.2
- jupyter-archive==3.4.0
- rise==5.7.1
- git+https://github.com/shaneknapp/python-popularity-contest.git@add-error-handling
- git-credential-helpers==0.2
- jupyter-tree-download==1.0.1
29 changes: 0 additions & 29 deletions infra-requirements.txt

This file was deleted.

4 changes: 2 additions & 2 deletions install-mambaforge.bash
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -ex

cd $(dirname $0)
MAMBAFORGE_VERSION=22.9.0-2
MAMBAFORGE_VERSION=24.7.1-0

URL="https://github.com/conda-forge/miniforge/releases/download/${MAMBAFORGE_VERSION}/Mambaforge-${MAMBAFORGE_VERSION}-Linux-x86_64.sh"
INSTALLER_PATH=/tmp/mambaforge-installer.sh
Expand Down Expand Up @@ -37,6 +37,6 @@ rm ${INSTALLER_PATH}
# Remove the pip cache created as part of installing mambaforge
rm -rf /root/.cache

chown -R $NB_USER:$NB_USER ${CONDA_DIR}
chown -Rh $NB_USER:$NB_USER ${CONDA_DIR}

conda list -n root
6 changes: 0 additions & 6 deletions install.R

This file was deleted.

Empty file modified r-packages/2021-spring-phw-272a.r
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion r-packages/ph-142.r
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class_libs = c(
"dagitty", "0.3-0",
"cowplot", "1.1.1",
"patchwork", "1.3.0",
"tigris", "1.0",
"tigris", "2.1",
"googlesheets4", "1.0.0",
"coxed", "0.3.3"
)
Expand Down
2 changes: 1 addition & 1 deletion r-packages/ph-252.r
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class_libs = c(
"epitools", "0.5-10.1",
"rms", "6.2-0",
"lmtest","0.9-38",
"car","3.0-10",
"car","3.1-3",
"SurvRegCensCov","1.4",
"ProfileLikelihood","1.1",
"biostat3","0.1.5"
Expand Down

0 comments on commit 34f76c1

Please sign in to comment.