Skip to content

Commit bfcfb5d

Browse files
committed
Upgrade to support python 3.14 by default
1 parent fd910e4 commit bfcfb5d

6 files changed

Lines changed: 5 additions & 8 deletions

File tree

Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
# amazonlinux:2023 has python 3.9 + venv
21
FROM amazonlinux:2023
32

4-
# We will need pip3 and zip
53
RUN yum -y update && yum -y install \
6-
python3-pip \
4+
python3.14 \
75
zip

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,5 @@ Architecture : x86_64
2424

2525
# Change Python Runtime or Architecture
2626
- If you wish to use a different Python runtime like 3.11, 3.12 etc, you can import a newer [Amazon Linux base image](https://hub.docker.com/_/amazonlinux) in the Dockerfile.
27-
This generally comes with a new stable version of Python
2827
- You can also install a [specific version of Python](https://www.python.org/downloads/) by updating the ```yum install``` lines of the Dockerfile
2928
- arm64 has known unresolved issues on Lambda with Python as of 20240322, so I recommend against it for now

docker_install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
python3 -m venv python
22
source python/bin/activate
33

4-
pip3 install -r requirements.txt -t python/lib/python3.9/site-packages
4+
pip3 install -r requirements.txt -t python/lib/python*/site-packages
55

6-
zip -r9 python.zip python
6+
zip -r9 python_layer.zip python

python.zip

-9.94 MB
Binary file not shown.

runner.sh renamed to runner_docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ docker run -td --name=$container_name $docker_image
66
docker cp ./requirements.txt $container_name:/
77

88
docker exec -i $container_name /bin/bash < ./docker_install.sh
9-
docker cp $container_name:/python.zip python.zip
9+
docker cp $container_name:/python_layer.zip python_layer.zip
1010
docker stop $container_name
1111
docker rm $container_name

runner_podman.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ podman run -td --name=$container_name $podman_image
66
podman cp ./requirements.txt $container_name:/
77

88
podman exec -i $container_name /bin/bash < ./docker_install.sh
9-
podman cp $container_name:/python.zip python.zip
9+
podman cp $container_name:/python_layer.zip python_layer.zip
1010
podman stop $container_name
1111
podman rm $container_name

0 commit comments

Comments
 (0)