Skip to content

Commit 39aef93

Browse files
authored
Merge pull request #2266 from Esri/docker-2.4.1
Notebook Docker: use conda-forge/pypi
2 parents dfe4ed3 + 05696cb commit 39aef93

6 files changed

+23
-9
lines changed

.github/workflows/DockerBuild.AzureFunctionsBaseImage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
version:
1212
description: "Version of ArcGIS API for Python to install in the image"
1313
type: string
14-
default: "2.3.1"
14+
default: "2.4.1"
1515
python_version:
1616
description: "Python version to base image on"
1717
type: string

.github/workflows/DockerBuild.LambdaBaseImage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
version:
1212
description: "Version of ArcGIS API for Python to install in the image"
1313
type: string
14-
default: "2.3.1"
14+
default: "2.4.1"
1515
python_version:
1616
description: "Python version to base image on"
1717
type: string

.github/workflows/DockerBuild.NotebookImage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
version:
1212
description: "Version of ArcGIS API for Python to install in the image"
1313
type: string
14-
default: "2.3.1"
14+
default: "2.4.1"
1515
python_version:
1616
description: "Python version to base image on"
1717
type: string

docker/AzureFunctionsBaseImage.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ LABEL org.opencontainers.image.source=https://github.com/esri/arcgis-python-api
1212
RUN apt-get update && apt-get install -y gcc libkrb5-dev krb5-config krb5-user && apt-get clean && rm -rf /var/lib/apt/lists/*
1313
RUN pip3 install azure-functions && rm -rf /home/.cache/pip
1414
# install arcgis
15-
ARG arcgis_version="2.3.1"
15+
ARG arcgis_version="2.4.1"
1616
# adding .* ensures the latest patch version is installed
1717
RUN pip3 install "arcgis==${arcgis_version}.*" && rm -rf /home/.cache/pip

docker/LambdaBaseImage.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LABEL org.opencontainers.image.source=https://github.com/esri/arcgis-python-api
1111
# install dependencies, then clean yum cache
1212
RUN yum -y install gcc gcc-c++ krb5-devel krb5-server krb5-libs && yum clean all && rm -rf /var/cache/yum
1313
# install arcgis
14-
ARG arcgis_version="2.3.1"
14+
ARG arcgis_version="2.4.1"
1515
# adding .* ensures the latest patch version is installed
1616
RUN pip3 install "arcgis==${arcgis_version}.*" --target "${LAMBDA_TASK_ROOT}" && rm -rf /root/.cache/pip
1717
# set entrypoint to app.py handler method

docker/NotebookImage.Dockerfile

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ ARG python_version="3.11"
22
FROM quay.io/jupyter/minimal-notebook:python-${python_version}
33

44
ARG python_version
5-
ARG arcgis_version="2.4.0"
5+
ARG arcgis_version="2.4.1"
6+
ARG gdal_version="3.10.2"
67
ARG sampleslink="https://github.com/Esri/arcgis-python-api/releases/download/v${arcgis_version}/samples.zip"
78
ARG githubfolder="arcgis-python-api"
89
ARG env_name=arcgis
@@ -14,14 +15,27 @@ LABEL org.opencontainers.image.source=https://github.com/Esri/arcgis-python-api
1415

1516
USER ${NB_UID}
1617

17-
# Install Python API from Conda
18-
RUN conda create -n ${env_name} -c esri -c defaults arcgis=${arcgis_version} python=${python_version} -y --quiet --override-channels \
18+
# Create conda environment with specified python version
19+
RUN conda create -n ${env_name} -c conda-forge python=${python_version} -y --quiet --override-channels \
20+
&& conda clean --all -f -y \
21+
&& find /opt/conda -name __pycache__ -type d -exec rm -rf {} +
22+
23+
# Install gdal
24+
RUN conda install -n ${env_name} -c conda-forge gdal=${gdal_version} -y --quiet --override-channels \
25+
&& conda clean --all -f -y \
26+
&& find /opt/conda -name __pycache__ -type d -exec rm -rf {} +
27+
28+
# Install ArcGIS API for Python from pypi
29+
RUN . activate ${env_name} \
30+
# adding .* ensures the latest patch version is installed
31+
&& python -m pip install "arcgis==${arcgis_version}.*" \
1932
&& conda clean --all -f -y \
2033
&& find /opt/conda -name __pycache__ -type d -exec rm -rf {} +
2134

2235
# Install arcgis-mapping if arcgis_version >= 2.4.0
2336
RUN (dpkg --compare-versions $arcgis_version ge 2.4.0 \
24-
&& conda install -n ${env_name} -c esri -c defaults arcgis-mapping -y --quiet --override-channels \
37+
&& . activate ${env_name} \
38+
&& python -m pip install arcgis-mapping \
2539
&& conda clean --all -f -y \
2640
&& find /opt/conda -name __pycache__ -type d -exec rm -rf {} +;) \
2741
|| echo "[INFO] Skipped installing arcgis-mapping for version $arcgis_version (>= 2.4.0 required for arcgis-mapping)"

0 commit comments

Comments
 (0)