Skip to content

Commit cb2eed2

Browse files
committed
Merge 'upstream/master' into jy-update-html-df-item-2.3
2 parents 091da70 + 8faec9b commit cb2eed2

File tree

95 files changed

+79014
-2824
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+79014
-2824
lines changed

.github/workflows/DockerBuild.LambdaBaseImage.yaml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@ name: DockerBuild.LambdaImage
33
on:
44
# allow it to be run on-demand
55
workflow_dispatch:
6+
inputs:
7+
version:
8+
description: "Version of ArcGIS API for Python to install in the image"
9+
type: string
10+
default: "2.3.0"
11+
python_version:
12+
description: "Python version to base image on"
13+
type: string
14+
default: "3.11"
15+
is_latest_release:
16+
description: "Version of ArcGIS API for Python is Latest current release"
17+
type: boolean
18+
default: false
19+
is_default_supported_python:
20+
description: "Python version is default supported version (i.e. python used by Pro and Enterprise)"
21+
type: boolean
22+
default: false
623

724
jobs:
825
build-and-push:
@@ -31,10 +48,10 @@ jobs:
3148
images: |
3249
ghcr.io/esri/arcgis-python-api-lambda
3350
tags: |
34-
type=raw,value=2.2.0,enable={{is_default_branch}}
35-
type=raw,value=latest,enable={{is_default_branch}}
36-
type=schedule,pattern={{date 'YY.MM'}},enable={{is_default_branch}}
37-
type=sha,format=long
51+
type=raw,value=${{ inputs.version }}-python${{ inputs.python_version }}
52+
type=raw,value=${{ inputs.version }},enable=${{ inputs.is_default_supported_python && github.ref_name == github.event.repository.default_branch }}
53+
type=raw,value=latest,enable=${{ inputs.is_latest_release && inputs.is_default_supported_python && github.ref_name == github.event.repository.default_branch }}
54+
type=schedule,pattern={{date 'YY.MM'}},enable=${{ inputs.is_latest_release && inputs.is_default_supported_python && github.ref_name == github.event.repository.default_branch }}
3855
3956
- id: docker_build
4057
name: Build image and push to GitHub Container Registry
@@ -43,6 +60,9 @@ jobs:
4360
# relative path to the place where source code with Dockerfile is located
4461
context: .
4562
file: ./docker/LambdaBaseImage.Dockerfile
63+
build-args: |
64+
python_version=${{ inputs.python_version }}
65+
arcgis_version=${{ inputs.version }}
4666
tags: ${{ steps.meta.outputs.tags }}
4767
provenance: false
4868
platforms: linux/amd64

docker/LambdaBaseImage.Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
ARG PYTHON_VERSION=3.9
2-
# lambda python image, defaults to python 3.9
3-
FROM public.ecr.aws/lambda/python:${PYTHON_VERSION}
1+
ARG python_version=3.11
2+
# lambda python image, defaults to python 3.11
3+
FROM public.ecr.aws/lambda/python:${python_version}
44

55
# set metadata
66
LABEL org.opencontainers.image.authors="[email protected]"
@@ -9,10 +9,11 @@ LABEL org.opencontainers.image.licenses=Apache
99
LABEL org.opencontainers.image.source=https://github.com/esri/arcgis-python-api
1010

1111
# install dependencies, then clean yum cache
12-
RUN yum -y install gcc krb5-devel krb5-server krb5-libs && yum clean all && rm -rf /var/cache/yum
12+
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_PYTHON_VERSION=2.2.0
15-
RUN pip3 install arcgis==${ARCGIS_PYTHON_VERSION} --target "${LAMBDA_TASK_ROOT}"
14+
ARG arcgis_version="2.3.0"
15+
# adding .* ensures the latest patch version is installed
16+
RUN pip3 install "arcgis==${arcgis_version}.*" --target "${LAMBDA_TASK_ROOT}" && rm -rf /root/.cache/pip
1617
# set entrypoint to app.py handler method
1718
# (note that app.py is missing from this base image)
1819
CMD [ "app.handler" ]

guide/01-getting-started/install-and-set-up.ipynb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -290,24 +290,24 @@
290290
"source": [
291291
"## Install in Google Colaboratory\n",
292292
"\n",
293-
"[Google Colab](https://colab.research.google.com/) is a Google-hosted Jupyter notebook service that allows a user to access their notebooks from anywhere by storing them in [Google Drive](https://drive.google.com/). It requires no setup beyond creating a Google account, and provides free computing resources, including cloud-based GPUs. To learn more, refer to the [FAQ](https://research.google.com/colaboratory/faq.html) or [tutorial](https://colab.research.google.com/drive/16pBJQePbqkz3QFV54L4NIkOn1kwpuRrj).\n",
293+
"[Google Colab](https://colab.research.google.com/) is a Google-hosted Jupyter notebook service that allows a user to access their notebooks from anywhere by storing them in [Google Drive](https://drive.google.com/). It requires no setup beyond creating a Google account, and provides free computing resources, including cloud-based GPUs. To learn more, refer to the [FAQ](https://research.google.com/colaboratory/faq.html) or [tutorial](https://colab.research.google.com/drive/16pBJQePbqkz3QFV54L4NIkOn1kwpuRrj). Colab is a very convenient platform for ArcGIS administration and management, as it allows a user to run scripts from wherever they have access to a Google account.\n",
294294
"\n",
295-
"Google Colab runs in a cloud virtual machine that uses [Ubuntu](https://ubuntu.com), meaning that it can process bash commands in addition to Python logic. Any command with a `!` in front of it will be treated as if it were entered on the command line. This means that the ArcGIS API for Python can be installed with `pip`, provided that a small Colab-specific dependency detail is first taken care of.\n",
295+
"Google Colab runs in a cloud virtual machine that uses [Ubuntu](https://ubuntu.com), meaning that it can process bash commands in addition to Python logic. Any command with a `!` in front of it will be treated as if it were entered on the command line. This means that the ArcGIS API for Python can be installed with `pip`.\n",
296296
"\n",
297297
"Follow the steps below to install:\n",
298298
"\n",
299299
"* If you have not already done so, register an account with Google and open a new Colab notebook.\n",
300300
"\n",
301-
"* Add an empty code cell, and run `!sudo apt-get install libkrb5-dev`. This takes care of the dependency issue, allowing `pip` to complete an install of gssapi, which otherwise fails.\n",
302-
"\n",
303-
"* Add another cell and run `!pip install arcgis`.\n",
301+
"* Add a cell and run `!pip install arcgis`.\n",
304302
" - Note: if your account has already been working on a notebook (even a separate one), it may prompt you to restart your runtime in order for this to work. This well reset your environment variables without altering any of your code, allowing you to re-run these commands and install successfully.\n",
305303
"\n",
306-
"* You can confirm the installation by running `!pip list`. The list should include arcgis along with all of the other packages found in a normal install.\n",
304+
"* You can confirm the installation by running `!pip list`. The list should include arcgis along with all of the proper dependencies found in a normal arcgis install.\n",
305+
"\n",
306+
"* Run `import arcgis` to confirm that it works properly.\n",
307307
"\n",
308-
"Currently, Google Colab is not readily compatible with the ArcGIS mapping widget. However, Colab is a very convenient platform for ArcGIS administration and management, as it allows a user to run scripts from wherever they have access to a Google account.\n",
308+
"Currently, Google Colab is not readily compatible with the ArcGIS mapping widget, but may work with some functions that return iFrames, such as the `WebExperience.preview()` method. To enable these widgets (or any 3rd-party widget) in Colab, run `from google.colab import output` followed by `output.enable_custom_widget_manager()`. \n",
309309
"\n",
310-
">Note: At the time of writing this, this installation process works for the default version of Python that comes with Colab, 3.7.13. Functionality with other versions has not yet been confirmed."
310+
">Note: At the time of writing this, this installation process works for the default version of Python that comes with Colab, 3.10.12. This means that only ArcGIS 2.2.0 and higher can be installed, as prior versions are not compatible with Python 3.10+. Downgrading the Python version in Colab is possible, but may interfere with other dependencies needed to run ArcGIS."
311311
]
312312
},
313313
{
@@ -564,7 +564,7 @@
564564
],
565565
"metadata": {
566566
"kernelspec": {
567-
"display_name": "Python 3",
567+
"display_name": "Python 3 (ipykernel)",
568568
"language": "python",
569569
"name": "python3"
570570
},
@@ -578,7 +578,7 @@
578578
"name": "python",
579579
"nbconvert_exporter": "python",
580580
"pygments_lexer": "ipython3",
581-
"version": "3.9.11"
581+
"version": "3.9.16"
582582
},
583583
"toc": {
584584
"base_numbering": 1,

guide/01-getting-started/using-the-jupyter-lab-environment.ipynb

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)