From 47461fe0b3a8e24b52636a9f112c2000f5bf4c53 Mon Sep 17 00:00:00 2001 From: dafeliton Date: Tue, 12 Nov 2024 22:26:16 -0800 Subject: [PATCH] move dependencies to requirements.txt to avoid conda conflicts, susbequent jupyter fix --- Dockerfile | 20 +++++++++----------- requirements.txt | 7 ++++++- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0a717a9..5e2076b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,24 +22,22 @@ RUN pip uninstall pillow fiona -y && \ # pygeos is deprecated and has been merged with shapely. (pygeos works around python GIL) # https://github.com/shapely/shapely + +# geopandas/cartopy/etc. error when importing sqlite3 from python: +# ImportError: /opt/conda/lib/python3.11/lib-dynload/_sqlite3.cpython-311-x86_64-linux-gnu.so: undefined symbol: sqlite3_deserialize +# Moved to requirements.txt + RUN mamba install -c conda-forge -y \ - geopandas \ - cartopy \ - shapely \ - pysal \ - contextily \ - osmnx \ - jupyterlab_widgets + jupyterlab_widgets && \ + fix-permissions $CONDA_DIR && \ + fix-permissions /home/$NB_USER && \ + mamba clean --all RUN mamba install -c esri arcgis -y -RUN mamba install numpy -y - RUN pip install --upgrade pip setuptools wheel RUN pip install --upgrade nbconvert -# RUN mamba install -c conda-forge geopandas cartopy pygeos pysal contextily osmnx jupyterlab_widgets -y - USER $NB_UID COPY arcgis_test.ipynb /opt diff --git a/requirements.txt b/requirements.txt index f1201bc..e82be2e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,4 +15,9 @@ shapely pyshp pandas censusdata -graphviz \ No newline at end of file +graphviz +geopandas +cartopy +pysal +contextily +osmnx \ No newline at end of file