Skip to content

Spring 2025 updates #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: pygris
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: Build notebook
on:
schedule:
- cron: '0 2 * * *'
push:
workflow_dispatch:

Expand Down
32 changes: 27 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
ARG BASE_CONTAINER=ghcr.io/ucsd-ets/datascience-notebook:2024.4-stable
FROM $BASE_CONTAINER
FROM ghcr.io/ucsd-ets/datascience-notebook:2024.4-stable

LABEL maintainer="UC San Diego ITS/ETS <ets-consult@ucsd.edu>"
LABEL maintainer="https://github.com/ucsd-ets/spatial-datascience-notebook"

USER root

Expand All @@ -17,6 +16,27 @@ RUN apt update -y && \

RUN jupyter labextension install @dafeliton/jupyterlab-notebookparams

### BEGIN censusdis
ARG ENVNAME=censusdis
ARG PYVER=3.11
RUN mamba create --yes -p "${CONDA_DIR}/envs/${ENVNAME}" \
python=${PYVER} \
ipykernel \
jupyterlab && \
mamba clean --all -f -y

RUN "${CONDA_DIR}/envs/${ENVNAME}/bin/python" -m ipykernel install --prefix /opt/conda --name="${ENVNAME}" && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

RUN "${CONDA_DIR}/envs/${ENVNAME}/bin/pip" install --no-cache-dir \
censusdis \
'numpy==1.26.4' \
folium \
matplotlib \
mapclassify
### END censusdis

# Install geospatial packages first
RUN pip uninstall pillow fiona -y && \
pip install -r ~/requirements.txt && \
Expand All @@ -36,9 +56,11 @@ RUN mamba install -c esri arcgis arcgis-mapping -y && \

RUN pip install --upgrade pip setuptools wheel
RUN pip install --upgrade nbconvert
RUN pip install numpy==1.26.4 pygris shap

# RUN pip install "numpy<2"
RUN mamba install --yes 'py-xgboost' && \
mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

USER $NB_UID

Expand Down
16 changes: 8 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
pillow
pyproj
openpyxl
cenpy
python-Levenshtein
geopy
openpyxl
cenpy
python-Levenshtein
geopy
ipyleaflet
keplergl
mesa-geo
mesa
matplotlib
mesa-geo
mesa
matplotlib
shapely
pyshp
pandas
censusdata
censusdata
graphviz
geopandas
cartopy
Expand Down