Skip to content

Commit 7cd9929

Browse files
authored
Use base image blas & pip pysal. (#1071)
- blas is already pre-installed on the image. Do not reinstall it from conda. - install pysal from pip - removed pysal pin. Version 2.5.0 (latest) fixed the issue with remote datasets downloaded at import time (see b/161473620#comment7).
1 parent a4e6f95 commit 7cd9929

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

Dockerfile

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,18 @@ ENV PROJ_LIB=/opt/conda/share/proj
3232
# Install conda packages not available on pip.
3333
# When using pip in a conda environment, conda commands should be ran first and then
3434
# the remaining pip commands: https://www.anaconda.com/using-pip-in-a-conda-environment/
35-
# Using the same global consistent ordered list of channels
36-
RUN conda config --add channels conda-forge && \
37-
conda config --add channels nvidia && \
35+
RUN conda config --add channels nvidia && \
3836
conda config --add channels rapidsai && \
39-
# ^ rapidsai is the highest priority channel, default lowest, conda-forge 2nd lowest.
40-
conda install mkl blas && \
41-
# b/161473620#comment7 pin required to prevent resolver from picking pysal 1.x., pysal 2.2.x is also downloading data on import.
42-
conda install cartopy=0.19 imagemagick=7.0 pyproj==3.1.0 pysal==2.1.0 && \
37+
# Base image channel order: conda-forge (highest priority), defaults.
38+
# End state: rapidsai (highest priority), nvidia, conda-forge, defaults.
39+
conda install mkl cartopy=0.19 imagemagick=7.1 pyproj==3.1.0 && \
4340
/tmp/clean-layer.sh
4441

4542
RUN pip install torch==1.7.1+cpu torchvision==0.8.2+cpu torchaudio==0.7.2 torchtext==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html && \
4643
/tmp/clean-layer.sh
4744

48-
RUN pip install seaborn python-dateutil dask python-igraph && \
45+
RUN pip install pysal && \
46+
pip install seaborn python-dateutil dask python-igraph && \
4947
pip install pyyaml joblib husl geopy ml_metrics mne pyshp && \
5048
pip install pandas && \
5149
# Install h2o from source.

tests/test_pysal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import unittest
22

3-
from pysal.lib.weights import lat2W
3+
from libpysal.weights import lat2W
44

55
class TestPysal(unittest.TestCase):
66
def test_distance_band(self):

0 commit comments

Comments
 (0)